<p>neels <strong>uploaded patch set #5</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18505">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">refactor bsc_find_msc()'s round-robin<br><br>Prepare for MSC pooling by NRI. Before introducing actual NRI decoding and MSC<br>matching, fix the bsc_find_msc() implementation.<br>(Indicate the places relevant for NRI by "TODO" comments).<br><br>bsc_find_msc() puts an MSC to the end of the internal list of MSCs when it was<br>used. This has problems:<br><br>- Modifying the list affects VTY output, e.g. 'show running-config' and<br>  'show mscs' change their order in which MSCs are shown, depending on how<br>  often a round-robin selection has taken place.<br><br>- Emergency calls and normal calls potentially pick quite different sets of<br>  eligible MSCs. When the round-robin choices between these sets affect each<br>  other, the choice is not balanced. For example, if only the first MSC is<br>  allow_emerg == true, every emergency call would reset the round-robin state<br>  to the first MSC in the list, also for normal calls. If there are regular<br>  emergency calls, normal calls will then tend to load more onto the first few<br>  MSCs after those picked for emergency calls.<br><br>Fix: Never affect the ordering of MSCs in the internal list of MSCs. Instead,<br>keep a "next_nr" MSC index and determine the next round-robin target like that.<br>Keep a separate "next_emerg_nr" MSC index so that emergency call round-robin<br>does no longer cause normal round-robin to skip MSCs.<br><br>Further problems in current bsc_find_msc():<br><br>- The "blind:" label should also do round-robin.<br>- The "paging:" part should not attempt to use disconnected MSCs.<br>- Both should also heed NRI matches (when they are added).<br><br>Fix: instead of code dup, determine Paging Response matching with an earlier<br>Paging Request right at the start. If that yields no usable MSC, continue into<br>the normal NRI and round-robin selection.<br><br>The loop in this patch is inspired by the upcoming implementation of MSC<br>pooling by NRI, as indicated by the two TODO comments. The point is that, in<br>the presence of an NRI from a TMSI identity, we always need to iterate all of<br>the MSCs to find possible NRI matches. The two round-robin sets (Emergency and<br>non-Emergency) are determined in the same loop iteration for cases that have no<br>or match no NRI, or where a matching MSC is currently disconnected.<br><br>Change-Id: Idf71f07ba5a17d5b870dc1a5a2875b6fedb61291<br>---<br>M include/osmocom/bsc/gsm_data.h<br>M src/osmo-bsc/gsm_08_08.c<br>2 files changed, 71 insertions(+), 60 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/18505/5</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18505">change 18505</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-bsc/+/18505"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Idf71f07ba5a17d5b870dc1a5a2875b6fedb61291 </div>
<div style="display:none"> Gerrit-Change-Number: 18505 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>