diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-06 22:18:17 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-09 22:45:10 +0200 |
commit | bd49fd24925e07e08c02c8be6dee26f4f751220f (patch) | |
tree | a08e73505883e22b8fa0b10305fb3f8393ea26bc | |
parent | 43adbe200c1e1184b444ba8fc16b8bb0c6d8050a (diff) |
[VAMOS] trx_sched_init_ts(): assign names to per-timeslot counters
Thanks to [1], it's now possible to associate a human-readable
name with a rate counter group. Before this API, we had to use
weird index values for each timeslot, and with introduction
of the shadow timeslots the situation got even worse.
Change-Id: Ie872ab37661fa5d44f219f59c7daaa1033113289
Depends: [1] I0dc510783dd9ae8436dae8005a7b3330e80d36f3
Related: SYS#4895, OS#4941
-rw-r--r-- | TODO-RELEASE | 1 | ||||
-rw-r--r-- | src/common/scheduler.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE index 82f25d61..aa0b2fd3 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -3,3 +3,4 @@ update libosmo-abis dependency to > 1.1.1 for osmo_rtp_socket_set_priority() update libosmo-abis dependency to > 1.1.1 for new e1_input vty commands for DSCP + priority update libosmocore dependency to > 1.5.1-73-g524b4f80 for osmo_bts_features_desc() +update libosmocore dependency to > 1.5.1-133-g09f075fa for name in (struct rate_ctr_group) diff --git a/src/common/scheduler.c b/src/common/scheduler.c index 3ab94a27..0e1f4957 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -611,6 +611,7 @@ static void trx_sched_init_ts(struct gsm_bts_trx_ts *ts, { struct l1sched_ts *l1ts; unsigned int i; + char name[128]; l1ts = talloc_zero(ts->trx, struct l1sched_ts); OSMO_ASSERT(l1ts != NULL); @@ -622,6 +623,11 @@ static void trx_sched_init_ts(struct gsm_bts_trx_ts *ts, l1ts->ctrs = rate_ctr_group_alloc(ts->trx, &l1sched_ts_ctrg_desc, rate_ctr_idx); + snprintf(name, sizeof(name), "bts%u-trx%u-ts%u%s", + ts->trx->bts->nr, ts->trx->nr, ts->nr, + ts->vamos.is_shadow ? "-shadow" : ""); + rate_ctr_group_set_name(l1ts->ctrs, name); + INIT_LLIST_HEAD(&l1ts->dl_prims); for (i = 0; i < ARRAY_SIZE(l1ts->chan_state); i++) { |