From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, bridge@lists.linux-foundation.org,
Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: [PATCH net-next 6/6] net: bridge: vlan: dump mcast ctx querier state
Date: Fri, 13 Aug 2021 18:00:02 +0300 [thread overview]
Message-ID: <20210813150002.673579-7-razor@blackwall.org> (raw)
In-Reply-To: <20210813150002.673579-1-razor@blackwall.org>
From: Nikolay Aleksandrov <nikolay@nvidia.com>
Use the new mcast querier state dump infrastructure and export vlans'
mcast context querier state embedded in attribute
BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE.
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
---
include/uapi/linux/if_bridge.h | 1 +
net/bridge/br_vlan_options.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
index eceaad200bf6..f71a81fdbbc6 100644
--- a/include/uapi/linux/if_bridge.h
+++ b/include/uapi/linux/if_bridge.h
@@ -563,6 +563,7 @@ enum {
BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
BRIDGE_VLANDB_GOPTS_MCAST_ROUTER,
BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS,
+ BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE,
__BRIDGE_VLANDB_GOPTS_MAX
};
#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
diff --git a/net/bridge/br_vlan_options.c b/net/bridge/br_vlan_options.c
index b4fd5fa441b7..49dec53a4a74 100644
--- a/net/bridge/br_vlan_options.c
+++ b/net/bridge/br_vlan_options.c
@@ -299,7 +299,9 @@ bool br_vlan_global_opts_fill(struct sk_buff *skb, u16 vid, u16 vid_range,
nla_put_u8(skb, BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
v_opts->br_mcast_ctx.multicast_querier) ||
nla_put_u8(skb, BRIDGE_VLANDB_GOPTS_MCAST_ROUTER,
- v_opts->br_mcast_ctx.multicast_router))
+ v_opts->br_mcast_ctx.multicast_router) ||
+ br_multicast_dump_querier_state(skb, &v_opts->br_mcast_ctx,
+ BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE))
goto out_err;
clockval = jiffies_to_clock_t(v_opts->br_mcast_ctx.multicast_last_member_interval);
@@ -379,6 +381,7 @@ static size_t rtnl_vlan_global_opts_nlmsg_size(void)
+ nla_total_size(sizeof(u64)) /* BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL */
+ nla_total_size(sizeof(u8)) /* BRIDGE_VLANDB_GOPTS_MCAST_QUERIER */
+ nla_total_size(sizeof(u8)) /* BRIDGE_VLANDB_GOPTS_MCAST_ROUTER */
+ + br_multicast_querier_state_size() /* BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE */
#endif
+ nla_total_size(sizeof(u16)); /* BRIDGE_VLANDB_GOPTS_RANGE */
}
--
2.31.1
next prev parent reply other threads:[~2021-08-13 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 14:59 [PATCH net-next 0/6] net: bridge: mcast: dump querier state Nikolay Aleksandrov
2021-08-13 14:59 ` [PATCH net-next 1/6] net: bridge: mcast: record querier port device ifindex instead of pointer Nikolay Aleksandrov
2021-08-13 14:59 ` [PATCH net-next 2/6] net: bridge: mcast: make sure querier port/address updates are consistent Nikolay Aleksandrov
2021-08-13 14:59 ` [PATCH net-next 3/6] net: bridge: mcast: consolidate querier selection for ipv4 and ipv6 Nikolay Aleksandrov
2021-08-13 15:00 ` [PATCH net-next 4/6] net: bridge: mcast: dump ipv4 querier state Nikolay Aleksandrov
2021-08-16 8:33 ` Dan Carpenter
2021-08-16 8:37 ` Nikolay Aleksandrov
2021-08-13 15:00 ` [PATCH net-next 5/6] net: bridge: mcast: dump ipv6 " Nikolay Aleksandrov
2021-08-13 15:00 ` Nikolay Aleksandrov [this message]
2021-08-14 13:10 ` [PATCH net-next 0/6] net: bridge: mcast: dump " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210813150002.673579-7-razor@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux-foundation.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).