Change in osmo-bts[master]: sched: Log RX->RTP packet like we do in add_l1sap_header

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Jul 19 15:05:32 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10053


Change subject: sched: Log RX->RTP packet like we do in add_l1sap_header
......................................................................

sched: Log RX->RTP packet like we do in add_l1sap_header

Other backends use already msgb in lower layers and eventually call
add_l1sap_header to push TCH data up the stack.
backends using common/scheduler.c (bts-trx, bts-virt) are the only ones
not yet using msgb in lower layer but only creating the msgb
immediatelly before sending it in _sched_compose_tch_ind. Let's add a
log message there too to have similar output in all BTS backends.

Change-Id: Ia90b051f308abcd8b88b84e861da593844b0d81a
---
M src/common/scheduler.c
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/53/10053/1

diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 8c9d30d..a32dfdf 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -380,14 +380,17 @@
 {
 	struct msgb *msg;
 	struct osmo_phsap_prim *l1sap;
+	struct gsm_bts_trx *trx = l1t->trx;
 	struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
+	uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn;
+	struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)];
 
 	/* compose primitive */
 	msg = l1sap_msgb_alloc(tch_len);
 	l1sap = msgb_l1sap_prim(msg);
 	osmo_prim_init(&l1sap->oph, SAP_GSM_PH, PRIM_TCH,
 		PRIM_OP_INDICATION, msg);
-	l1sap->u.tch.chan_nr = trx_chan_desc[chan].chan_nr | tn;
+	l1sap->u.tch.chan_nr = chan_nr;
 	l1sap->u.tch.fn = fn;
 	msg->l2h = msgb_put(msg, tch_len);
 	if (tch_len)
@@ -396,6 +399,8 @@
 	if (l1ts->chan_state[chan].lost)
 		l1ts->chan_state[chan].lost--;
 
+	LOGP(DL1P, LOGL_DEBUG, "%s Rx -> RTP: %s\n",
+	     gsm_lchan_name(lchan), osmo_hexdump(msg->data, msg->len));
 	/* forward primitive */
 	l1sap_up(l1t->trx, l1sap);
 

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia90b051f308abcd8b88b84e861da593844b0d81a
Gerrit-Change-Number: 10053
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180719/d84658ed/attachment.htm>


More information about the gerrit-log mailing list