<p>Vadim Yanitskiy <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/10309">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">common/scheduler.c: track TDMA frame loss per logical channels<br><br>This change modifies the logic of TDMA frame loss tracking. To<br>be more precise, the tracking logic was moved from per timeslot<br>level to per logical channel level, what makes OsmoBTS more<br>accurate in its measurements.<br><br>But before getting into details, it's important to clarify some<br>things about the Uplink burst processing in transceiver (OsmoTRX).<br>If an Uplink burst is detected, OsmoTRX demodulates it and sends<br>to OsmoBTS. If nothing is detected on a particular timeslot,<br>OsmoTRX will do nothing. In other words, it will not<br>notify OsmoBTS about this.<br><br>Meanwhile, there are usually a few logical channels mapped to a<br>single TDMA timeslot. Let's use SDCCH8 channel configuration as<br>an example (simplified layout):<br><br>  /* SDCCH/8 (ss=0), subscriber A (active) */<br>  { TRXC_SDCCH8_0,    bid=0 },<br>  { TRXC_SDCCH8_0,    bid=1 },<br>  { TRXC_SDCCH8_0,    bid=2 },<br>  { TRXC_SDCCH8_0,    bid=3 }, // <-- last_fn=X<br><br>  /* SDCCH/8 (ss=1), subscriber B (inactive) */<br>  { TRXC_SDCCH8_1,    bid=0 },<br>  { TRXC_SDCCH8_1,    bid=1 },<br>  { TRXC_SDCCH8_1,    bid=2 },<br>  { TRXC_SDCCH8_1,    bid=3 },<br><br>  /* SDCCH/8 (ss=2), subscriber C (active) */<br>  { TRXC_SDCCH8_2,    bid=0 }, // <-- current_fn=X+5<br>  { TRXC_SDCCH8_2,    bid=1 },<br>  { TRXC_SDCCH8_2,    bid=2 },<br>  { TRXC_SDCCH8_2,    bid=3 },<br><br>SDCCH8 has 8 sub-slots, so up to 8 subscribers can use a single<br>timeslot. Let's imagine there are three subscribers: A, B, and C.<br>Both A and C are active subscribers, i.e. they are continuously<br>transmitting UL bursts, while B is not using ss=1 anymore.<br><br>The original way of TDMA frame loss tracking was the following:<br><br>  - when an UL burst is received, store it's frame number in<br>    the timeslot state structure (last_fn);<br><br>  - when the next UL burst is received on same timeslot, compute<br>    how many frames elapsed since the last_fn;<br><br>  - if elapsed = (current_fn - last_fn) is lower than 10, then<br>    iterate from (last_fn + 1) until the current_fn and send<br>    dummy zero-filled bursts to the higher layers;<br><br>  - otherwise (elapsed > 10), process the current burst,<br>    and do nothing :/<br><br>According to our example, subscriber A is sending 4 bursts, then<br>nobody is sending anything, and then subscriber C is sending<br>4 bursts. So, there is a 4 frames long gap between the both<br>transmissions, which is being substituted by dummy bursts. But,<br>as the logical channel on ss=1 is not active, they are dropped.<br><br>This is not that scary, but the current algorithm produces lots<br>of false-positives, and moreover is not able to track real frame<br>drops in longer periods (i.e. >10). So, tracking the frame loss<br>per individual logical channels makes much more sense.<br><br>Let's finally drop this hackish 'while (42) { ... }', and track<br>the amount of lost / received TDMA frames (bursts) individually<br>per logical channels. Let's also use the multiframe period as<br>the loss detection period, instead of hardcoded 10. And finally,<br>let's print more informative debug messages.<br><br>Also, it makes sense to use the amount of lost / received bursts<br>during the calculation of the measurement reports, instead of<br>sending dummy bursts, but let's do this separately.<br><br>Change-Id: I70d05b67a35ddcbdd1b6394dbd7198404a440e76<br>Related: OS#3428<br>---<br>M include/osmo-bts/scheduler.h<br>M src/common/scheduler.c<br>2 files changed, 133 insertions(+), 65 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/10309/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/10309">change 10309</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/10309"/><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-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I70d05b67a35ddcbdd1b6394dbd7198404a440e76 </div>
<div style="display:none"> Gerrit-Change-Number: 10309 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Jenkins Builder </div>