Change in ...osmo-bts[master]: log: set L1 SAPI context

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

osmith gerrit-no-reply at lists.osmocom.org
Tue Sep 24 11:59:35 UTC 2019


osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15539 )

Change subject: log: set L1 SAPI context
......................................................................


Patch Set 4: Code-Review-2

>  > Sorry, I had assumed, that in OsmoBTS, this L1 SAPI logging would
>  > only be relevant for the BTS<-->PCU socket, and therefore thought
>  > the appropriate log context would be what is defined with
>  > PCU_IF_SAPI_*.
> 
> I wonder where that impression was raised? The L1 is not used only by the PCU,
> but by all of OsmoBTS.

I ran "git grep SAPI" in osmo-bts.git, and got the most matches inside the common dir in pcu_sock.c. But I know now, that I should have researched it better.

>  > * set the log context in other places in OSmoBTS, that are not
>  > related to the PCU (that must be the other side, when talking to
>  > hardware backends)
> 
> You need to set that value for every L1P (and possibly L1C?) primitive received from the
> respective PHY, as soon as possible.  That's for the uplink part.  For downlink, I
> suspect it's sufficient to set it based on chan_nr when received from L1SAP.

What I'm still struggling with is, how one should extract the L1 SAPI value from every L1P/L1C primitive. With "as soon as possible" you could either mean in the code of the various PHYs or in common/l1sap.c's l1sap_up() function (because that is the first time, the primitive is passed to the common code).

But there is only a "struct osmo_phsap_prim", which does not seem to have the SAPI attached to it. The only relation to the SAPI I can find, is in the "to_gsmtap" function, which gets called in l1sap_up() for *some* types of primitives (but not all of them! so it does not seem suitable for logging?). The to_gsmtap() function then runs one of gsmtap_pdch(), gsmtap_ph_data() or gsmtap_ph_rach(), which in turn set the chan_type variable, and this seems to be the SAPI (as its value comes from gsmtap_sapi_names).

So I'm wondering, what is the best way to go forward with this? Modify (and rename) the to_gsmtap function to also set the SAPI log context? (but then what about the cases where to_gsmtap is not called, are they simply irrelevant for setting the log context?)

Or am I missing something and there is a feasible way to read the SAPI from the osmo_phsap_prim?

Thanks!

(Voting with -2 and removing WIP state, because otherwise no mail notifications get sent.)


-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15539
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6b7bb2e1d61502b61214f854a4ec5cbb7267545b
Gerrit-Change-Number: 15539
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <axilirator at gmail.com>
Gerrit-Comment-Date: Tue, 24 Sep 2019 11:59:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190924/b08592e5/attachment.htm>


More information about the gerrit-log mailing list