Change in osmo-bts[master]: [VAMOS] trx_sched_init_ts(): assign names to per-timeslot counters

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Thu Jun 10 11:51:08 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24592 )

Change subject: [VAMOS] trx_sched_init_ts(): assign names to per-timeslot counters
......................................................................

[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
---
M TODO-RELEASE
M src/common/scheduler.c
2 files changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  dexter: Looks good to me, approved



diff --git a/TODO-RELEASE b/TODO-RELEASE
index 82f25d6..aa0b2fd 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 3ab94a2..0e1f495 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -611,6 +611,7 @@
 {
 	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 @@
 	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++) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24592
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie872ab37661fa5d44f219f59c7daaa1033113289
Gerrit-Change-Number: 24592
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210610/a15adbf7/attachment.htm>


More information about the gerrit-log mailing list