laforge has submitted this change. ( 
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(-)

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



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);


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I200e068f1bbc495fb806402877551924beea214e
Gerrit-Change-Number: 27812
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: tnt <[email protected]>
Gerrit-MessageType: merged

Reply via email to