Change in osmo-bsc[master]: abis_rsl: Fix TCH-as-SDCCH allocation on Channel Request

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jan 25 11:05:14 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12677 )

Change subject: abis_rsl: Fix TCH-as-SDCCH allocation on Channel Request
......................................................................

abis_rsl: Fix TCH-as-SDCCH allocation on Channel Request

On rsl_rx_chan_rqd(), so far osmo-bsc tried to preferably assign the lchan type
that was asked for in the RACH. Firstly, this contained a bug, and secondly,
it does not make sense to heed that preference, since we do late assignment.

Ignore the preference for the MS' TCH kind.
We do late assignment to avoid codec mismatches. In the "old days", we would
heed the MS' TCH channel kind, even if the MSC or BSC didn't actually allow
or prefer that channel kind. Hence, in the presence of both TCH/F and TCH/H,
the MS could ask for TCH/F (which we would grant on the MO side) and the BSC
or MSC could prefer TCH/H (which we would apply on the MT side), and hence
fabricate a codec mismatch. Instead, since quite some time now, we *always*
assign an SDCCH first, and only later on do another Assignment to hand out
a proper voice lchan that heeds the MS capability bits as well as MSC's and
BSC's preferences.

By completely ignoring the channel kind the MS asked for in the RACH, we
also eliminate this bug in rsl_rx_chan_rqd():
- If the first "lchan_select_by_type(GSM_LCHAN_SDDCH)" fails (all SDDCH in use),
  we should try to fall back to any TCH instead, to serve as SDCCH.
- the first "if (!lchan && lctype != GSM_LCHAN_SDCCH)" was an attempt to prefer
  a fallback to the lchan type the MS requested.
- the remaining two "if (!lchan && lctype == GSM_LCHAN_SDCCH)" were obviously
  only applied if the MS asked for an SDCCH, and skipped if the type was TCH/*.
- hence, missing was: if the MS asked for a TCH, to also try the *other* TCH
  kind that the MS did not ask for. (Example: all SDCCH in use, MS asks for
  TCH/F, but BSC has only TCH/H lchans; we should assign TCH/H as SDCCH, instead
  we said "no resources")

Change-Id: Ie3684cf071751f9528183d761c588102936e498c
Related: OS#3503
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 4 insertions(+), 14 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index d67573f..fd6dbdb 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1375,22 +1375,12 @@
 	/* check availability / allocate channel
 	 *
 	 * - First try to allocate SDCCH.
-	 * - If SDCCH is not available, try whatever MS requested, if not SDCCH.
-	 * - If there is still no channel available, reject channel request.
+	 * - If SDCCH is not available, try a TCH/H (less bandwith).
+	 * - If there is still no channel available, try a TCH/F.
 	 *
-	 * Note: If the MS requests not TCH/H, we don't know if the phone
-	 *       supports TCH/H, so we must assign TCH/F or SDCCH.
 	 */
 	lchan = lchan_select_by_type(bts, GSM_LCHAN_SDCCH);
-	if (!lchan && lctype != GSM_LCHAN_SDCCH) {
-		LOGP(DRSL, LOGL_NOTICE, "(bts=%d) CHAN RQD: no resources for %s "
-			"0x%x, retrying with %s\n",
-			msg->lchan->ts->trx->bts->nr,
-			gsm_lchant_name(GSM_LCHAN_SDCCH), rqd_ref->ra,
-			gsm_lchant_name(lctype));
-		lchan = lchan_select_by_type(bts, lctype);
-	}
-	if (!lchan && lctype == GSM_LCHAN_SDCCH) {
+	if (!lchan) {
 		LOGP(DRSL, LOGL_NOTICE, "(bts=%d) CHAN RQD: no resources for %s "
 			"0x%x, retrying with %s\n",
 			msg->lchan->ts->trx->bts->nr,
@@ -1398,7 +1388,7 @@
 			gsm_lchant_name(GSM_LCHAN_TCH_H));
 		lchan = lchan_select_by_type(bts, GSM_LCHAN_TCH_H);
 	}
-	if (!lchan && lctype == GSM_LCHAN_SDCCH) {
+	if (!lchan) {
 		LOGP(DRSL, LOGL_NOTICE, "(bts=%d) CHAN RQD: no resources for %s "
 			"0x%x, retrying with %s\n",
 			msg->lchan->ts->trx->bts->nr,

-- 
To view, visit https://gerrit.osmocom.org/12677
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3684cf071751f9528183d761c588102936e498c
Gerrit-Change-Number: 12677
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Kévin Redon <kredon at sysmocom.de>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: daniel <daniel at totalueberwachung.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190125/c9b9b5c2/attachment.htm>


More information about the gerrit-log mailing list