Message ID | 20220919083136.23043-1-nicolas.dichtel@6wind.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2-next] link: display 'allmulti' counter | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On 9/19/22 2:31 AM, Nicolas Dichtel wrote: > This counter is based on the same principle that the 'promiscuity' counter: > the flag ALLMULTI is displayed only when it is explicitly requested by the > userland. This counter enables to know if 'allmulti' is configured on an > interface. > > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> > --- > include/uapi/linux/if_link.h | 1 + > ip/ipaddress.c | 6 ++++++ > 2 files changed, 7 insertions(+) > applied to iproute2-next. Thanks
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index e0fbbfeeb3a1..a59b4cd03e93 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -370,6 +370,7 @@ enum { IFLA_GRO_MAX_SIZE, IFLA_TSO_MAX_SIZE, IFLA_TSO_MAX_SEGS, + IFLA_ALLMULTI, __IFLA_MAX }; diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 45955e1c065e..1f034f7db520 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -1205,6 +1205,12 @@ int print_linkinfo(struct nlmsghdr *n, void *arg) " promiscuity %u ", rta_getattr_u32(tb[IFLA_PROMISCUITY])); + if (tb[IFLA_ALLMULTI]) + print_uint(PRINT_ANY, + "allmulti", + " allmulti %u ", + rta_getattr_u32(tb[IFLA_ALLMULTI])); + if (tb[IFLA_MIN_MTU]) print_uint(PRINT_ANY, "min_mtu", "minmtu %u ",
This counter is based on the same principle that the 'promiscuity' counter: the flag ALLMULTI is displayed only when it is explicitly requested by the userland. This counter enables to know if 'allmulti' is configured on an interface. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> --- include/uapi/linux/if_link.h | 1 + ip/ipaddress.c | 6 ++++++ 2 files changed, 7 insertions(+)