Change in osmo-bts[master]: osmo-bts-trx: refactor handling of version specific TRXD parts

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

fixeria gerrit-no-reply at lists.osmocom.org
Wed Apr 21 15:14:30 UTC 2021


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

Change subject: osmo-bts-trx: refactor handling of version specific TRXD parts
......................................................................


Patch Set 3:

(4 comments)

https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c 
File src/osmo-bts-trx/trx_if.c:

https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@785 
PS3, Line 785: 		bi->mod = TRX_MOD_T_GMSK;
> shouldn't this be 8PSK sometimes?
It should definitely be 8-PSK here, thanks!


https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@810 
PS3, Line 810: 	buf_len -= TRX_UL_V0HDR_LEN;
> buf_len is not used here, so let's drop this unused op which is run for each TRXD packet.
Ack


https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@905 
PS3, Line 905: } trx_data_codec[16] = {
> why is this size=16?
It's basically the maximum number of versions we can have. If we somehow negotiate a non-existing version, we will not run into buffer overflow. But I think instead of checking if 'trx_data_codec[pdu_ver].parse != NULL' below we can also do 'pdu_ver < ARRAY_SIZE(trx_data_codec)'.


https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@959 
PS3, Line 959: 	hdr_len = trx_data_codec[pdu_ver].parse(l1h->phy_inst, &bi, buf, buf_len);
> fyi, func pointer call is SLOW, not sure it's the best idea to use them here which are called a lot, […]
Wow, I thought it's the opposite. After checking the assembly of the current code I found out that gcc does not inline functions (even with -O2) and does not optimize the 'switch(pdu_ver)' statement as I would expect. We end up with CMP and CALL instructions for each TRXD PDU version. Maybe I should just mark the version specific parsers with 'inline' instead.



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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7aedd85a8d4f6d6191cd3b75272a688208fb2879
Gerrit-Change-Number: 23832
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Apr 2021 15:14:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210421/cdd57c02/attachment.htm>


More information about the gerrit-log mailing list