<p>Max has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13206">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BSSGP: use BVCI and NSEI as rate counter index<br><br>According to 3GPP TS 48.018 ยง5.4.4 Network Service Entity (used in BSS<br>and SGSN) is identified by both NSEI and BVCI but previously rate<br>counter group used only BVCI for index. Let's fix this by using<br>concatenation of BVCI and NSEI as index.<br><br>Change-Id: I6a3ffe2fd147532f2469ec8120134ed69692fb41<br>Related: OS#3827<br>---<br>M src/gb/gprs_bssgp.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/13206/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c</span><br><span>index b0a1089..decb979 100644</span><br><span>--- a/src/gb/gprs_bssgp.c</span><br><span>+++ b/src/gb/gprs_bssgp.c</span><br><span>@@ -119,14 +119,14 @@</span><br><span> struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei)</span><br><span> {</span><br><span>    struct bssgp_bvc_ctx *ctx;</span><br><span style="color: hsl(120, 100%, 40%);">+    unsigned int idx = bvci << 16 | nsei;</span><br><span> </span><br><span>      ctx = talloc_zero(bssgp_tall_ctx, struct bssgp_bvc_ctx);</span><br><span>     if (!ctx)</span><br><span>            return NULL;</span><br><span>         ctx->bvci = bvci;</span><br><span>         ctx->nsei = nsei;</span><br><span style="color: hsl(0, 100%, 40%);">-    /* FIXME: BVCI is not unique, only BVCI+NSEI ?!? */</span><br><span style="color: hsl(0, 100%, 40%);">-     ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, bvci);</span><br><span style="color: hsl(120, 100%, 40%);">+ ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, idx);</span><br><span>         ctx->fc = talloc_zero(ctx, struct bssgp_flow_control);</span><br><span>    /* cofigure for 2Mbit, 30 packets in queue */</span><br><span>        bssgp_fc_init(ctx->fc, 100000, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13206">change 13206</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/13206"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6a3ffe2fd147532f2469ec8120134ed69692fb41 </div>
<div style="display:none"> Gerrit-Change-Number: 13206 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>