Skip to contentSkip to conversation

link: display 'allmulti' counter

PATCH Applied Nicolas Dichtel 2 participants 2 messages Sep 19, 2022 – Sep 22, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 link: display 'allmulti' counter

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.

---
 include/uapi/linux/if_link.h | 1 +
 ip/ipaddress.c               | 6 ++++++
 2 files changed, 7 insertions(+)
include/uapi/linux/if_link.h +1 -0
index e0fbbfeeb3a1..a59b4cd03e93 100644
@@ -370,6 +370,7 @@ enum {
 	IFLA_GRO_MAX_SIZE,
 	IFLA_TSO_MAX_SIZE,
 	IFLA_TSO_MAX_SEGS,
+	IFLA_ALLMULTI,
 
 	__IFLA_MAX
 };
ip/ipaddress.c +6 -0
index 45955e1c065e..1f034f7db520 100644
@@ -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 ",
Signature · 1 line
2.33.0
Applied
#1 lore raw
Quoted 11 lines · Nicolas Dichtel

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.

---
 include/uapi/linux/if_link.h | 1 +
 ip/ipaddress.c               | 6 ++++++
 2 files changed, 7 insertions(+)

applied to iproute2-next. Thanks