Skip to content

net: bridge: mcast: dump querier state

Nikolay Aleksandrov bridge netdev oe-kbuild oe-kbuild-all 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyApplied 6/6

Patches in v1 All 6 applied

#Subject and filesSizeRepliesApplied
1/6net: bridge: mcast: record querier port device ifindex instead of pointernet/bridge/br_multicast.c net/bridge/br_private.h+13 -80 repliesApplied
2/6net: bridge: mcast: make sure querier port/address updates are consistentnet/bridge/br_multicast.c net/bridge/br_private.h+54 -210 repliesApplied
3/6net: bridge: mcast: consolidate querier selection for ipv4 and ipv6net/bridge/br_multicast.c+29 -380 repliesApplied
4/6net: bridge: mcast: dump ipv4 querier stateinclude/uapi/linux/if_bridge.h include/uapi/linux/if_link.h net/bridge/br_multicast.c +2 more+92 -11 replyApplied
5/6net: bridge: mcast: dump ipv6 querier stateinclude/uapi/linux/if_bridge.h net/bridge/br_multicast.c+35 -40 repliesApplied
6/6net: bridge: vlan: dump mcast ctx querier stateinclude/uapi/linux/if_bridge.h net/bridge/br_vlan_options.c+5 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/6] net: bridge: mcast: dump querier state

From: Nikolay Aleksandrov <[email protected]>

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(-)
Signature · 1 line
2.31.1