All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC net-next 00/13] net: bridge: forwarding of unknown IPv4/IPv6/MAC BUM traffic
@ 2022-04-11 13:38 ` Joachim Wiberg
  0 siblings, 0 replies; 76+ messages in thread
From: Joachim Wiberg @ 2022-04-11 13:38 UTC (permalink / raw)
  To: Roopa Prabhu, Nikolay Aleksandrov
  Cc: netdev, bridge, David S . Miller, Jakub Kicinski, Joachim Wiberg,
	Tobias Waldekranz, Vladimir Oltean

This is a proposal to improve forwarding control of BUM traffic to the
bridge itself.  Another, related, issue regarding loss of function when
an IP multicast router is detected, is also brought up here which can be
a separate series in v2.

First, we add BROPT_BCAST_FLOOD, BROPT_UNICAST_FLOOD, BROPT_MCAST_FLOOD
flags for unknown traffic to the bridge itself, with netlink support and
a selftest.  We ensure backwards compatible forwarding behavior is
preserved by enabling these flags by default.  Please note however,
these flags do not affect the behavior of IFF_PROMISC on the bridge
interface.

Second, and with the above in place, we set out to verify flooding of
unknown *and* known multicast to regular bridge ports, including the
bridge itself.  We use `tcpdump -p` in the tests to ensure we do not
trigger IFF_PROIMISC.  Unknown multicast should be forwarded according
to the MCAST_FLOOD flag, and known multicast according the MDB and to
multicast router ports.

We find that forwarding of unknown IP multicast stops[1] as soon as a
multicast router is known.  Affecting all ports, including the bridge
itself (this series).  The root cause for this is the classification
`mrouters_only` in br_multicast_rcv().

Dropping this classification of unknown IP multicast and moving the
multicast flow handling from br_multicast_flood() to br_flood() fixes
this problem.  The bridge now properly floods all unknown multicast, and
this can now be controlled using the MCAST_FLOOD flag on all ports
including the bridge itself.

The use of br_flood() opens up the need for the multicast 'rport' API,
but that is behind CONFIG_BRIDGE_IGMP_SNOOPING, which is the primary
reason for this being an RFC series.  I'd love some feedback on how to
go about all this, opening up that API and even the take on the issue as
a whole.

Honestly, despite taking great care to not change the bridge's default
behavior the patch series in itself propose quite radical changes that
alone mandate RFC status at this point.  There has been some discussion
already on this in 20220410220324.4c3l3idubwi3w6if@skbuf and I expect
more disucssion here.

Note: this series builds upon my previous patch for host l2 mdb entries,
      20220411084054.298807-1-troglobit@gmail.com, extending the test
      bridge_mdb.sh

Best regards
 /Joachim

[1]: MAC multicast is not affected.

net/bridge/br_device.c                        |   4 +
 net/bridge/br_forward.c                       |  11 +
 net/bridge/br_input.c                         |  11 +-
 net/bridge/br_multicast.c                     |   6 +-
 net/bridge/br_netlink.c                       | 170 +++++++---
 net/bridge/br_private.h                       |   7 +-
 net/bridge/br_switchdev.c                     |   8 +-
 net/bridge/br_sysfs_if.c                      |   2 +-
 .../drivers/net/ocelot/tc_flower_chains.sh    |  24 +-
 .../testing/selftests/net/forwarding/Makefile |   3 +-
 .../selftests/net/forwarding/bridge_flood.sh  | 170 ++++++++++
 .../selftests/net/forwarding/bridge_mdb.sh    | 321 +++++++++++++++++-
 tools/testing/selftests/net/forwarding/lib.sh |  33 +-
 13 files changed, 683 insertions(+), 87 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/bridge_flood.sh
 mode change 100644 => 100755 tools/testing/selftests/net/forwarding/lib.sh

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

end of thread, other threads:[~2022-04-13 10:13 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 13:38 [PATCH RFC net-next 00/13] net: bridge: forwarding of unknown IPv4/IPv6/MAC BUM traffic Joachim Wiberg
2022-04-11 13:38 ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 01/13] net: bridge: add control of bum flooding to bridge itself Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-12 18:27   ` Nikolay Aleksandrov
2022-04-12 18:27     ` [Bridge] " Nikolay Aleksandrov
2022-04-12 20:29     ` Nikolay Aleksandrov
2022-04-12 20:29       ` [Bridge] " Nikolay Aleksandrov
2022-04-13  9:51     ` Joachim Wiberg
2022-04-13  9:51       ` [Bridge] " Joachim Wiberg
2022-04-13  9:58       ` Nikolay Aleksandrov
2022-04-13  9:58         ` [Bridge] " Nikolay Aleksandrov
2022-04-13 10:09         ` Joachim Wiberg
2022-04-13 10:09           ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 02/13] net: bridge: rename br_switchdev_set_port_flag() to .._dev_flag() Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 03/13] net: bridge: minor refactor of br_setlink() for readability Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-12 18:36   ` Nikolay Aleksandrov
2022-04-12 18:36     ` [Bridge] " Nikolay Aleksandrov
2022-04-13  9:22     ` Joachim Wiberg
2022-04-13  9:22       ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 04/13] net: bridge: netlink support for controlling BUM flooding to bridge Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-12 18:24   ` Nikolay Aleksandrov
2022-04-12 18:24     ` [Bridge] " Nikolay Aleksandrov
2022-04-13 10:04     ` Joachim Wiberg
2022-04-13 10:04       ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 05/13] selftests: forwarding: add TCPDUMP_EXTRA_FLAGS to lib.sh Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 17:20   ` Vladimir Oltean
2022-04-11 17:20     ` [Bridge] " Vladimir Oltean
2022-04-12  7:39     ` Joachim Wiberg
2022-04-12  7:39       ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 06/13] selftests: forwarding: multiple instances in tcpdump helper Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 17:26   ` Vladimir Oltean
2022-04-11 17:26     ` [Bridge] " Vladimir Oltean
2022-04-11 13:38 ` [PATCH RFC net-next 07/13] selftests: forwarding: new test, verify bridge flood flags Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 20:21   ` Vladimir Oltean
2022-04-11 20:21     ` [Bridge] " Vladimir Oltean
2022-04-12  7:55     ` Joachim Wiberg
2022-04-12  7:55       ` [Bridge] " Joachim Wiberg
2022-04-12 13:40       ` Vladimir Oltean
2022-04-12 13:40         ` [Bridge] " Vladimir Oltean
2022-04-11 13:38 ` [PATCH RFC net-next 08/13] net: bridge: avoid classifying unknown multicast as mrouters_only Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-12 13:59   ` Nikolay Aleksandrov
2022-04-12 13:59     ` [Bridge] " Nikolay Aleksandrov
2022-04-12 17:27     ` Joachim Wiberg
2022-04-12 17:27       ` [Bridge] " Joachim Wiberg
2022-04-12 17:37       ` Nikolay Aleksandrov
2022-04-12 17:37         ` [Bridge] " Nikolay Aleksandrov
2022-04-13  8:51         ` Joachim Wiberg
2022-04-13  8:51           ` [Bridge] " Joachim Wiberg
2022-04-13  8:55           ` Nikolay Aleksandrov
2022-04-13  8:55             ` [Bridge] " Nikolay Aleksandrov
2022-04-13  9:00             ` Nikolay Aleksandrov
2022-04-13  9:00               ` [Bridge] " Nikolay Aleksandrov
2022-04-13 10:12               ` Joachim Wiberg
2022-04-13 10:12                 ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 09/13] selftests: forwarding: rename test groups for next bridge mdb tests Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 20:23   ` Vladimir Oltean
2022-04-11 20:23     ` [Bridge] " Vladimir Oltean
2022-04-12  7:57     ` Joachim Wiberg
2022-04-12  7:57       ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 10/13] selftests: forwarding: verify flooding of unknown multicast Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 11/13] selftests: forwarding: verify strict mdb fwd of known multicast Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 12/13] selftests: forwarding: verify strict filtering doesn't leak Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg
2022-04-11 13:38 ` [PATCH RFC net-next 13/13] selftests: forwarding: verify flood of known mc on mcast_router port Joachim Wiberg
2022-04-11 13:38   ` [Bridge] " Joachim Wiberg

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.