Change in libosmocore[master]: BSSGP: use BVCI and NSEI as rate counter index

Max gerrit-no-reply at lists.osmocom.org
Mon Mar 11 15:15:07 UTC 2019


Max has uploaded this change for review. ( https://gerrit.osmocom.org/13206


Change subject: BSSGP: use BVCI and NSEI as rate counter index
......................................................................

BSSGP: use BVCI and NSEI as rate counter index

According to 3GPP TS 48.018 §5.4.4 Network Service Entity (used in BSS
and SGSN) is identified by both NSEI and BVCI but previously rate
counter group used only BVCI for index. Let's fix this by using
concatenation of BVCI and NSEI as index.

Change-Id: I6a3ffe2fd147532f2469ec8120134ed69692fb41
Related: OS#3827
---
M src/gb/gprs_bssgp.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/13206/1

diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index b0a1089..decb979 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -119,14 +119,14 @@
 struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei)
 {
 	struct bssgp_bvc_ctx *ctx;
+	unsigned int idx = bvci << 16 | nsei;
 
 	ctx = talloc_zero(bssgp_tall_ctx, struct bssgp_bvc_ctx);
 	if (!ctx)
 		return NULL;
 	ctx->bvci = bvci;
 	ctx->nsei = nsei;
-	/* FIXME: BVCI is not unique, only BVCI+NSEI ?!? */
-	ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, bvci);
+	ctx->ctrg = rate_ctr_group_alloc(ctx, &bssgp_ctrg_desc, idx);
 	ctx->fc = talloc_zero(ctx, struct bssgp_flow_control);
 	/* cofigure for 2Mbit, 30 packets in queue */
 	bssgp_fc_init(ctx->fc, 100000, 2*1024*1024/8, 30, &_bssgp_tx_dl_ud);

-- 
To view, visit https://gerrit.osmocom.org/13206
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a3ffe2fd147532f2469ec8120134ed69692fb41
Gerrit-Change-Number: 13206
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190311/4f2fce98/attachment.html>


More information about the gerrit-log mailing list