From patchwork Mon Sep 19 08:31:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 12979758 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45D8AC54EE9 for ; Mon, 19 Sep 2022 08:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbiISIbv (ORCPT ); Mon, 19 Sep 2022 04:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiISIbv (ORCPT ); Mon, 19 Sep 2022 04:31:51 -0400 Received: from smtpservice.6wind.com (unknown [185.13.181.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 519DB2127F for ; Mon, 19 Sep 2022 01:31:50 -0700 (PDT) Received: from bretzel (bretzel.dev.6wind.com [10.17.1.57]) by smtpservice.6wind.com (Postfix) with ESMTPS id B968C60077; Mon, 19 Sep 2022 10:31:48 +0200 (CEST) Received: from dichtel by bretzel with local (Exim 4.92) (envelope-from ) id 1oaCBw-0005zv-Lo; Mon, 19 Sep 2022 10:31:48 +0200 From: Nicolas Dichtel To: David Ahern , Stephen Hemminger Cc: netdev@vger.kernel.org, Nicolas Dichtel Subject: [PATCH iproute2-next] link: display 'allmulti' counter Date: Mon, 19 Sep 2022 10:31:36 +0200 Message-Id: <20220919083136.23043-1-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com 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 --- include/uapi/linux/if_link.h | 1 + ip/ipaddress.c | 6 ++++++ 2 files changed, 7 insertions(+) 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 ",