Message ID | 20210813150002.673579-1-razor@blackwall.org (mailing list archive) |
---|---|
Headers | show |
Series | net: bridge: mcast: dump querier state | expand |
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Fri, 13 Aug 2021 17:59:56 +0300 you wrote: > From: Nikolay Aleksandrov <nikolay@nvidia.com> > > Hi, > This set adds the ability to dump the current multicast querier state. > This is extremely useful when debugging multicast issues, we've had > many cases of unexpected queriers causing strange behaviour and mcast > test failures. The first patch changes the querier struct to record > a port device's ifindex instead of a pointer to the port itself so we > can later retrieve it, I chose this way because it's much simpler > and doesn't require us to do querier port ref counting, it is best > effort anyway. Then patch 02 makes the querier address/port updates > consistent via a combination of multicast_lock and seqcount, so readers > can only use seqcount to get a consistent snapshot of address and port. > Patch 03 is a minor cleanup in preparation for the dump support, it > consolidates IPv4 and IPv6 querier selection paths as they share most of > the logic (except address comparisons of course). Finally the last three > patches add the new querier state dumping support, for the bridge's > global multicast context we embed the BRIDGE_QUERIER_xxx attributes > into IFLA_BR_MCAST_QUERIER_STATE and for the per-vlan global mcast > contexts we embed them into BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE. > > [...] Here is the summary with links: - [net-next,1/6] net: bridge: mcast: record querier port device ifindex instead of pointer https://git.kernel.org/netdev/net-next/c/bb18ef8e7e18 - [net-next,2/6] net: bridge: mcast: make sure querier port/address updates are consistent https://git.kernel.org/netdev/net-next/c/67b746f94ff3 - [net-next,3/6] net: bridge: mcast: consolidate querier selection for ipv4 and ipv6 https://git.kernel.org/netdev/net-next/c/c3fb3698f935 - [net-next,4/6] net: bridge: mcast: dump ipv4 querier state https://git.kernel.org/netdev/net-next/c/c7fa1d9b1fb1 - [net-next,5/6] net: bridge: mcast: dump ipv6 querier state https://git.kernel.org/netdev/net-next/c/85b410821174 - [net-next,6/6] net: bridge: vlan: dump mcast ctx querier state https://git.kernel.org/netdev/net-next/c/ddc649d158c5 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
From: Nikolay Aleksandrov <nikolay@nvidia.com> Hi, This set adds the ability to dump the current multicast querier state. This is extremely useful when debugging multicast issues, we've had many cases of unexpected queriers causing strange behaviour and mcast test failures. The first patch changes the querier struct to record a port device's ifindex instead of a pointer to the port itself so we can later retrieve it, I chose this way because it's much simpler and doesn't require us to do querier port ref counting, it is best effort anyway. Then patch 02 makes the querier address/port updates consistent via a combination of multicast_lock and seqcount, so readers can only use seqcount to get a consistent snapshot of address and port. Patch 03 is a minor cleanup in preparation for the dump support, it consolidates IPv4 and IPv6 querier selection paths as they share most of the logic (except address comparisons of course). Finally the last three patches add the new querier state dumping support, for the bridge's global multicast context we embed the BRIDGE_QUERIER_xxx attributes into IFLA_BR_MCAST_QUERIER_STATE and for the per-vlan global mcast contexts we embed them into BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE. The structure is: [IFLA_BR_MCAST_QUERIER_STATE / BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE] `[BRIDGE_QUERIER_IP_ADDRESS] - ip address of the querier `[BRIDGE_QUERIER_IP_PORT] - bridge port ifindex where the querier was seen (set only if external querier) `[BRIDGE_QUERIER_IP_OTHER_TIMER] - other querier timeout `[BRIDGE_QUERIER_IPV6_ADDRESS] - ip address of the querier `[BRIDGE_QUERIER_IPV6_PORT] - bridge port ifindex where the querier was seen (set only if external querier) `[BRIDGE_QUERIER_IPV6_OTHER_TIMER] - other querier timeout Later we can also add IGMP version of seen queriers and last seen values from the queries. Thanks, Nik Nikolay Aleksandrov (6): net: bridge: mcast: record querier port device ifindex instead of pointer net: bridge: mcast: make sure querier port/address updates are consistent net: bridge: mcast: consolidate querier selection for ipv4 and ipv6 net: bridge: mcast: dump ipv4 querier state net: bridge: mcast: dump ipv6 querier state net: bridge: vlan: dump mcast ctx querier state include/uapi/linux/if_bridge.h | 14 +++ include/uapi/linux/if_link.h | 1 + net/bridge/br_multicast.c | 211 ++++++++++++++++++++++++++------- net/bridge/br_netlink.c | 5 +- net/bridge/br_private.h | 7 +- net/bridge/br_vlan_options.c | 5 +- 6 files changed, 199 insertions(+), 44 deletions(-)