<p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c">File src/osmo-bts-trx/trx_if.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@785">Patch Set #3, Line 785:</a> <code style="font-family:monospace,monospace">                bi->mod = TRX_MOD_T_GMSK;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">shouldn't this be 8PSK sometimes?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It should definitely be 8-PSK here, thanks!</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@810">Patch Set #3, Line 810:</a> <code style="font-family:monospace,monospace">    buf_len -= TRX_UL_V0HDR_LEN;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">buf_len is not used here, so let's drop this unused op which is run for each TRXD packet.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@905">Patch Set #3, Line 905:</a> <code style="font-family:monospace,monospace">} trx_data_codec[16] = {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">why is this size=16?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">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)'.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832/3/src/osmo-bts-trx/trx_if.c@959">Patch Set #3, Line 959:</a> <code style="font-family:monospace,monospace"> hdr_len = trx_data_codec[pdu_ver].parse(l1h->phy_inst, &bi, buf, buf_len);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">fyi, func pointer call is SLOW, not sure it's the best idea to use them here which are called a lot, […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/23832">change 23832</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bts/+/23832"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7aedd85a8d4f6d6191cd3b75272a688208fb2879 </div>
<div style="display:none"> Gerrit-Change-Number: 23832 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 21 Apr 2021 15:14:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>