From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
andrew@lunn.ch, vivien.didelot@gmail.com, davem@davemloft.net,
idosch@mellanox.com, jiri@mellanox.com,
ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org,
roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com
Subject: [PATCH net-next 00/14] net: dsa: management mode for bcm_sf2
Date: Wed, 16 Jan 2019 12:00:48 -0800 [thread overview]
Message-ID: <20190116200102.2749-1-f.fainelli@gmail.com> (raw)
Hi all,
This patch series does a number of things in order to enable
management mode for bcm_sf2 (which could be easily extended to b53 with
proper testing later on). In order to get there, there were several use
cases that did not work correctly and that needed to be fixed:
- VLAN devices on top of switch ports not being member of a bridge, with
other switch ports being bridged, with the bridge having VLAN
filtering enabled.
- lack of multicast filtering by default on network ports which should
be happening in order for the non-bridged DSA ports to behave strictly
as Ethernet NICs with proper filering. This is accomplished by hooking
a ndo_set_rx_mode() function to the DSA slave network devices
- when VLAN filtering is globally enabled on the switch (because at
least a bridge device requires it), then we also need to make sure
that when doing multicast over VLAN devices over a switch port
(bridged or not) happens with the correct MDB address *and* VID
Hopefully the changes to net/8021q and net/bridge are deemed acceptable.
The Broadcom switches have a switch-wide VLAN filtering attribute,
which is why we must always make sure there is a valid VLAN entry even
for switch ports which are not part of a bridge device, yet there is at
least one bridge device spanning the switch.
Multicast flooding can be done on a per-port basis, including for the
CPU/management port, however, once multicast reception is enabled on the
CPU port, it bypasses the ARL (Address Resolution Logic), so we receive
*all* multicast, even from ports do not have their flooding bit set,
which is unfortunate. This is the reason why we must continue adding
enough HOST_MDB notifications to let the CPU port continue to filter
multicast traffic.
Here are some of the uses cases that were tested after this patch series
(all commands are running on the device being tested) and
iperf/ping/etc. should be working for/after all steps:
echo "file drivers/net/dsa/b53/b53_common.c +p" > /sys/kernel/debug/dynamic_debug/control
echo 8 7 4 1 > /proc/sys/kernel/printk
killall udhcpc
ip addr flush dev gphy
ip link add dev br0 type bridge
echo 1 > /sys/class/net/br0/bridge/vlan_filtering
ip link set dev gphy master br0
udhcpc -i br0
ip ro add 226.94.1.1/32 dev br0
iperf -s -B 226.94.1.1 -u &
vconfig add rgmii_1 100
ifconfig rgmii_1.100 192.168.100.10
ping -c 5 192.168.100.1
ip ro add 226.95.1.2/32 dev rgmii_1.100
iperf -s -B 226.95.1.2 -u &
vconfig add br0 42
bridge vlan add vid 42 dev gphy
bridge vlan add vid 42 dev br0 self
ifconfig br0.42 192.168.42.2
ip ro add 226.96.1.3/32 dev br0.42
Florian Fainelli (14):
net: bridge: multicast: Propagate br_mc_disabled_update() return
net: dsa: b53: Fix default VLAN ID
net: dsa: b53: Properly account for VLAN filtering
net: systemport: Fix reception of BPDUs
net: dsa: b53: Define registers for IGMP snooping
net: dsa: b53: Add support for MDB
net: dsa: Add ability to program multicast filter for CPU port
net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementation
net: bridge: Propagate MC addresses with VID through switchdev
net: vlan: Propagate MC addresses with VID through switchdev
net: dsa: Make VLAN filtering use DSA notifiers
net: dsa: Wire up multicast IGMP snooping attribute notification
net: dsa: b53: Add support for toggling IGMP snooping
net: dsa: bcm_sf2: Enable management mode
drivers/net/dsa/b53/b53_common.c | 219 ++++++++++++++++++---
drivers/net/dsa/b53/b53_priv.h | 14 +-
drivers/net/dsa/b53/b53_regs.h | 22 +++
drivers/net/dsa/bcm_sf2.c | 56 ++++--
drivers/net/dsa/bcm_sf2_regs.h | 5 +
drivers/net/ethernet/broadcom/bcmsysport.c | 4 +
include/net/dsa.h | 2 +
net/8021q/vlan_dev.c | 40 ++++
net/bridge/br_device.c | 55 ++++++
net/bridge/br_multicast.c | 19 +-
net/dsa/dsa_priv.h | 22 ++-
net/dsa/port.c | 42 ++--
net/dsa/slave.c | 107 +++++++++-
net/dsa/switch.c | 57 ++++++
14 files changed, 607 insertions(+), 57 deletions(-)
--
2.17.1
next reply other threads:[~2019-01-16 20:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 20:00 Florian Fainelli [this message]
2019-01-16 20:00 ` [PATCH net-next 01/14] net: bridge: multicast: Propagate br_mc_disabled_update() return Florian Fainelli
2019-01-17 13:47 ` Ido Schimmel
2019-01-17 19:27 ` Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 02/14] net: dsa: b53: Fix default VLAN ID Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 03/14] net: dsa: b53: Properly account for VLAN filtering Florian Fainelli
2019-01-17 16:36 ` Vivien Didelot
2019-01-17 17:48 ` Florian Fainelli
2019-01-17 18:47 ` Vivien Didelot
2019-01-17 19:06 ` Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 04/14] net: systemport: Fix reception of BPDUs Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 05/14] net: dsa: b53: Define registers for IGMP snooping Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 06/14] net: dsa: b53: Add support for MDB Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 07/14] net: dsa: Add ability to program multicast filter for CPU port Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 08/14] net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementation Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 09/14] net: bridge: Propagate MC addresses with VID through switchdev Florian Fainelli
2019-01-17 14:05 ` Ido Schimmel
2019-01-17 19:17 ` Florian Fainelli
2019-01-18 10:43 ` Ido Schimmel
2019-01-18 11:41 ` Ido Schimmel
2019-01-18 21:48 ` Florian Fainelli
2019-01-19 13:55 ` Ido Schimmel
2019-01-20 3:22 ` Florian Fainelli
2019-01-21 8:41 ` Ido Schimmel
2019-01-21 8:46 ` Jiri Pirko
2019-01-16 20:00 ` [PATCH net-next 10/14] net: vlan: " Florian Fainelli
2019-01-17 14:49 ` Ido Schimmel
2019-01-17 19:12 ` Florian Fainelli
2019-01-21 9:13 ` Ido Schimmel
2019-01-21 9:17 ` Ilias Apalodimas
2019-01-22 11:30 ` Ivan Khoronzhuk
2019-01-22 11:39 ` Ivan Khoronzhuk
2019-01-16 20:00 ` [PATCH net-next 11/14] net: dsa: Make VLAN filtering use DSA notifiers Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 12/14] net: dsa: Wire up multicast IGMP snooping attribute notification Florian Fainelli
2019-01-17 18:36 ` Vivien Didelot
2019-01-17 19:07 ` Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 13/14] net: dsa: b53: Add support for toggling IGMP snooping Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 14/14] net: dsa: bcm_sf2: Enable management mode Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116200102.2749-1-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=ilias.apalodimas@linaro.org \
--cc=ivan.khoronzhuk@linaro.org \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).