Re: [RFC iproute2-next v2] seg6: add counters support for SRv6 Behaviors

2021-04-17 Thread Paolo Lungaroni
Quoting Stephen Hemminger : On Thu, 15 Apr 2021 20:06:43 +0200 Paolo Lungaroni wrote: + if (is_json_context()) + open_json_object("stats64"); + + if (tb[SEG6_LOCAL_CNT_PACKETS]) { + packets = rta_getattr_u64(tb[SEG6_LOCAL_CNT_PACKETS]); +

Re: [RFC iproute2-next v2] seg6: add counters support for SRv6 Behaviors

2021-04-15 Thread Stephen Hemminger
On Thu, 15 Apr 2021 20:06:43 +0200 Paolo Lungaroni wrote: > + if (is_json_context()) > + open_json_object("stats64"); > + > + if (tb[SEG6_LOCAL_CNT_PACKETS]) { > + packets = rta_getattr_u64(tb[SEG6_LOCAL_CNT_PACKETS]); > + if (is_json_context()) { > +

[RFC iproute2-next v2] seg6: add counters support for SRv6 Behaviors

2021-04-15 Thread Paolo Lungaroni
We introduce the "count" optional attribute for supporting counters in SRv6 Behaviors as defined in [1], section 6. For each SRv6 Behavior instance, counters defined in [1] are: - the total number of packets that have been correctly processed; - the total amount of traffic in bytes of all packet