laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27812 )
Change subject: Set rate_ctr_group name for each line ......................................................................
Set rate_ctr_group name for each line
"Counters for each line in e1d 256" is not very useful unless you know that it's "(intf_nr << 8) | line_nr" and 256 == I1/L0.
Let's set the name string explicitly.
Change-Id: I200e068f1bbc495fb806402877551924beea214e --- M src/intf_line.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/12/27812/1
diff --git a/src/intf_line.c b/src/intf_line.c index 9b33141..63fd098 100644 --- a/src/intf_line.c +++ b/src/intf_line.c @@ -217,6 +217,7 @@ e1_line_new(struct e1_intf *intf, int line_id, void *drv_data) { struct e1_line *line; + char name[32];
if (line_id != -1) { line = e1_intf_find_line(intf, line_id); @@ -250,6 +251,8 @@
line->ctrs = rate_ctr_group_alloc(line, &line_ctrg_desc, intf->id << 8 | line->id); OSMO_ASSERT(line->ctrs); + snprintf(name, sizeof(name), "I%u:L%u", intf->id, line->id); + rate_ctr_group_set_name(line->ctrs, name);
llist_add_tail(&line->list, &intf->lines);