Change in osmo-bts[master]: fix ip.access dyn TS for osmo-bts-trx

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Aug 28 19:38:56 UTC 2018


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/10598 )

Change subject: fix ip.access dyn TS for osmo-bts-trx
......................................................................

fix ip.access dyn TS for osmo-bts-trx

For enabling PDCH on a dynamic timeslot, PDTCH and PTCCH SAPIs shall be
enabled. While osmo-bts-sysmo uses the lchan->type to determine which SAPIs to
enable (see lchan_activate() in osmo-bts-sysmo/oml.c:
sapis_for_lchan[lchan->type]), the osmo-bts-trx code instead relies on the
chan_nr indicating RSL_CHAN_OSMO_PDCH = 0xc0 (see trx_sched_set_lchan() in
common/scheduler.c and the PDTCH,PTCCH entries in trx_chan_desc[]).

The 0xc0 cbits are a non-standard invention specifically used for only Osmocom
style dyn TS, so the chan_nr for IPA style dyn TS will and should never include
this cbits pattern. Hence gsm_lchan2chan_nr() correctly always returns the
TCH/F equivalent chan_nr for IPA dyn TS.

Because trx_chan_desc[] relies on the 0xc0 in the chan_nr to activate the PDTCH
and PTCCH SAPIs, internally patch the 0xc0 cbits over the chan_nr in
osmo-bts-trx/l1_if.c for channel de-/activation, iff lchan->type == PDTCH.

This is technically a convoluted mix-up of the cbits usage. Nevertheless, it is
the simplest way to make IPA dyn TS behave the same as Osmocom dyn TS in
scheduler.c.

Apparently, IPA style dyn TS have never worked for osmo-bts-trx before?

Related: OS#3493
Change-Id: I0eed8a135f2ab7e7c0d15ad5c76430b7fe54df3d
---
M src/osmo-bts-trx/l1_if.c
1 file changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve; Verified
  Jenkins Builder: Verified



diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index a8fb401..23fc196 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -562,6 +562,20 @@
 						" chan_nr 0x%02x\n", chan_nr);
 					break;
 				}
+
+				/* trx_chan_desc[] in scheduler.c uses the RSL_CHAN_OSMO_PDCH cbits
+				 * (0xc0) to indicate the need for PDTCH and PTCCH SAPI activation.
+				 * However, 0xc0 is a cbits pattern exclusively used for Osmocom style
+				 * dyn TS (a non-standard RSL Chan Activ mod); hence, for IPA style dyn
+				 * TS, the chan_nr will never reflect 0xc0 and we would omit the
+				 * PDTCH,PTTCH SAPIs. To properly de-/activate the PDTCH SAPIs in
+				 * scheduler.c, make sure the 0xc0 cbits are set for de-/activating PDTCH
+				 * lchans, i.e. both Osmocom and IPA style dyn TS. (For Osmocom style dyn
+				 * TS, the chan_nr typically already reflects 0xc0, while it doesn't for
+				 * IPA style.) */
+				if (lchan->type == GSM_LCHAN_PDTCH)
+					chan_nr = RSL_CHAN_OSMO_PDCH | (chan_nr & ~RSL_CHAN_NR_MASK);
+
 				/* activate dedicated channel */
 				trx_sched_set_lchan(&l1h->l1s, chan_nr, LID_DEDIC, 1);
 				/* activate associated channel */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0eed8a135f2ab7e7c0d15ad5c76430b7fe54df3d
Gerrit-Change-Number: 10598
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180828/e437fc92/attachment.htm>


More information about the gerrit-log mailing list