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

laforge gerrit-no-reply at lists.osmocom.org
Tue Sep 24 16:36:00 UTC 2019


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

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


Patch Set 4:

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

if you used case insensitive matches you would have found that most matches are outside common.


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

you must do it in the bts-specific part - not in the PHY, as the PHY is outside of osmo-bts.

The rationale for that is quite obvious: It is exactly the tons of log statements (primarily LOGL_DEBUG)
in the BTS-specific code that require the filtering.  In order for any filtering to be effective,
it must be set as soon as possible, before any of those log statements are hit.

So to look at osmo-bts-sysmo as an example: l1if_handle_ind() or probably more likely in
handle_ph_data_ind(), handle_ph_ra_ind() and handle_ph_readytosend_ind() one would set that filter.

In handle_ph_data_ind, the phy/bts-specific SAPI value can be found in data_ind->sapi.  You add
one function to translate it to some new (common/shared) SAPI enum (if no such enum exists yet)
and set the log filter.

the main point is that the log context must be set *before* any related log messages are generated,
and that is in the downlink transmit direction in the common part, (RSL->LAPDm->common->specific->PHY) and in the uplink receive direction it's the BTS-specific part as the order is inverse.


-- 
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 16:36:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190924/5c44bd0b/attachment.htm>


More information about the gerrit-log mailing list