All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/5] IGMP snooping for local traffic
@ 2017-11-06 23:26 Andrew Lunn
  2017-11-06 23:26 ` [PATCH v3 net-next 1/5] net: bridge: Rename mglist to host_joined Andrew Lunn
                   ` (8 more replies)
  0 siblings, 9 replies; 38+ messages in thread
From: Andrew Lunn @ 2017-11-06 23:26 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Vivien Didelot, Florian Fainelli, Andrew Lunn

The linux bridge supports IGMP snooping. It will listen to IGMP
reports on bridge ports and keep track of which groups have been
joined on an interface. It will then forward multicast based on this
group membership.

When the bridge adds or removed groups from an interface, it uses
switchdev to request the hardware add an mdb to a port, so the
hardware can perform the selective forwarding between ports.

What is not covered by the current bridge code, is IGMP joins/leaves
from the host on the brX interface. These are not reported via
switchdev so that hardware knows the local host is interested in the
multicast frames.

Luckily, the bridge does track joins/leaves on the brX interface. The
code is obfusticated, which is why i missed it with my first attempt.
So the first patch tries to remove this obfustication. Currently,
there is no notifications sent when the bridge interface joins a
group. The second patch adds them. bridge monitor then shows
joins/leaves in the same way as for other ports of the bridge.

Then starts the work passing down to the hardware that the host has
joined/left a group. The existing switchdev mdb object cannot be used,
since the semantics are different. The existing
SWITCHDEV_OBJ_ID_PORT_MDB is used to indicate a specific multicast
group should be forwarded out that port of the switch. However here we
require the exact opposite. We want multicast frames for the group
received on the port to the forwarded to the host. Hence add a new
object SWITCHDEV_OBJ_ID_HOST_MDB, a multicast database entry to
forward to the host. This new object is then propagated through the
DSA layers. No DSA driver changes should be needed, this should just
work...

Andrew Lunn (5):
  net: bridge: Rename mglist to host_joined
  net: bridge: Send notification when host join/leaves a group
  net: bridge: Add/del switchdev object on host join/leave
  net: dsa: slave: Handle switchdev host mdb add/del
  net: dsa: switch: Don't add CPU port to an mdb by default

 include/net/switchdev.h   |  1 +
 net/bridge/br_input.c     |  2 +-
 net/bridge/br_mdb.c       | 50 +++++++++++++++++++++++++++++++++++++++++++----
 net/bridge/br_multicast.c | 18 ++++++++++-------
 net/bridge/br_private.h   |  2 +-
 net/dsa/slave.c           | 13 ++++++++++++
 net/dsa/switch.c          |  3 ++-
 net/switchdev/switchdev.c |  2 ++
 8 files changed, 77 insertions(+), 14 deletions(-)

-- 
2.15.0

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

end of thread, other threads:[~2017-11-09 21:40 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 23:26 [PATCH v3 net-next 0/5] IGMP snooping for local traffic Andrew Lunn
2017-11-06 23:26 ` [PATCH v3 net-next 1/5] net: bridge: Rename mglist to host_joined Andrew Lunn
2017-11-08  1:31   ` Nikolay Aleksandrov
2017-11-08  1:40   ` Florian Fainelli
2017-11-06 23:26 ` [PATCH v3 net-next 2/5] net: bridge: Send notification when host join/leaves a group Andrew Lunn
2017-11-08  1:39   ` Nikolay Aleksandrov
2017-11-08  1:41   ` Florian Fainelli
2017-11-06 23:26 ` [PATCH v3 net-next 3/5] net: bridge: Add/del switchdev object on host join/leave Andrew Lunn
2017-11-08  1:48   ` Nikolay Aleksandrov
2017-11-06 23:26 ` [PATCH v3 net-next 4/5] net: dsa: slave: Handle switchdev host mdb add/del Andrew Lunn
2017-11-06 23:26 ` [PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default Andrew Lunn
2017-11-07 10:12   ` Sergei Shtylyov
2017-11-07  1:01 ` [PATCH v3 net-next 0/5] IGMP snooping for local traffic Stephen Hemminger
2017-11-07 17:03 ` Vivien Didelot
2017-11-07 17:42   ` Andrew Lunn
2017-11-07 18:10     ` Florian Fainelli
2017-11-07 18:16     ` Vivien Didelot
2017-11-07 21:01       ` Andrew Lunn
2017-11-07 21:18         ` Florian Fainelli
2017-11-07 22:17           ` Andrew Lunn
2017-11-07 22:37             ` Vivien Didelot
2017-11-07 23:17               ` Andrew Lunn
2017-11-08  0:41                 ` Florian Fainelli
2017-11-09 18:41                   ` Florian Fainelli
2017-11-09 19:30                     ` Andrew Lunn
2017-11-09 19:38                       ` Florian Fainelli
2017-11-09 20:21                         ` Andrew Lunn
2017-11-09 20:35                           ` Florian Fainelli
2017-11-09 21:13                             ` Andrew Lunn
2017-11-09 21:40                               ` Ido Schimmel
2017-11-07 17:34 ` Egil Hjelmeland
2017-11-07 17:58   ` Andrew Lunn
2017-11-08 15:11     ` Egil Hjelmeland
2017-11-08 15:21       ` Andrew Lunn
2017-11-08 15:53       ` Vivien Didelot
2017-11-09  2:30 ` David Miller
2017-11-09  2:47   ` David Miller
2017-11-09 14:44     ` Vivien Didelot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.