netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Timing of host-joined bridge multicast groups with switchdev
@ 2021-02-23 17:37 Vladimir Oltean
  2021-02-23 17:56 ` Ido Schimmel
  0 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2021-02-23 17:37 UTC (permalink / raw)
  To: Nikolay Aleksandrov, Roopa Prabhu, Ido Schimmel, Andrew Lunn,
	Florian Fainelli
  Cc: netdev

Hi,

I have udhcpcd in my system and this is configured to bring interfaces
up as soon as they are created.

I create a bridge as follows:

ip link add br0 type bridge

As soon as I create the bridge and udhcpcd brings it up, I have some
other crap (avahi) that starts sending some random IPv6 packets to
advertise some local services, and from there, the br0 bridge joins the
following IPv6 groups:

33:33:ff:6d:c1:9c vid 0
33:33:00:00:00:6a vid 0
33:33:00:00:00:fb vid 0

br_dev_xmit
-> br_multicast_rcv
   -> br_ip6_multicast_add_group
      -> __br_multicast_add_group
         -> br_multicast_host_join
            -> br_mdb_notify

This is all fine, but inside br_mdb_notify we have br_mdb_switchdev_host
hooked up, and switchdev will attempt to offload the host joined groups
to an empty list of ports. Of course nobody offloads them.

Then when we add a port to br0:

ip link set swp0 master br0

the bridge doesn't replay the host-joined MDB entries from br_add_if ->
new_nbp -> br_multicast_add_port (should it?), and eventually the host
joined addresses expire, and a switchdev notification for deleting it is
emitted, but surprise, the original addition was already completely missed.

What to do?

Thanks,
-Vladimir

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-24  2:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 17:37 Timing of host-joined bridge multicast groups with switchdev Vladimir Oltean
2021-02-23 17:56 ` Ido Schimmel
2021-02-23 18:02   ` Vladimir Oltean
2021-02-23 19:29     ` Ido Schimmel
2021-02-23 19:49       ` Vladimir Oltean
2021-02-23 20:07         ` Vladimir Oltean
2021-02-24  2:01         ` [PATCH] net: bridge: add a function that replays port and host-joined kernel test robot

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).