Re: [PATCH net-next v3] net: dsa: b53: mirror CPU-bound frames to port 5 when port 8 is unused
From: Florian Fainelli
Date: Wed Dec 02 2026 - 17:51:33 EST
On 11/30/26 16:13, Joseph Telaak wrote:
With port 5 as the CPU port and Broadcom tags, b53_brcm_hdr_setup() puts
the switch in dual-IMP mode, in which frames for the CPU from the user
ports still go to port 8: BPDUs, the IGMP/MLD copies
b53_enable_mcast_snooping() enables, and most traffic of standalone
ports. On an external switch whose port 8 is not connected these are
lost, so STP never sees its peers and a loop between two user ports
takes the host off the network.
Mirror them to port 5: everything that leaves port 8, and frames to the
bridge group address as they enter a user port, which the port 8 mirror
does not deliver from a bridged port. Port 8 is enabled with its link
forced up, in the disabled STP state and without flood receive, so that
only frames for the CPU leave it; this relies on port 8 transmitting
with nothing attached, as it does on the test board. The switch has one
mirror, so tc mirror offload is refused. Frames to 01:80:c2:00:00:02, 03
and 0d still do not reach the CPU from a bridged port. The mirror is set
up only on the 531x5 switches: in a switch inside a SoC, port 8 is wired
to a SoC MAC, and the external 539x, which has the same mode, is
untested.
Observed on a BCM53125 board in real use, with both user ports cabled
into the same LAN. Tested there with a host sending test frames into a
user port: bridged, BPDUs, broadcast and flooded multicast reached the
CPU once each and forwarding kept working; standalone, all but EAPOL to
01:80:c2:00:00:03 did, once each. The IGMP/MLD copies were not tested,
as the test kernel lacks b53_enable_mcast_snooping(). No selftests were
run.
Fixes: 8fab459e69ab ("net: dsa: b53: Enable Broadcom tags for 531x5/539x families")
Fixes: 4227ea91e265 ("net: dsa: b53: prevent standalone from trying to forward to other ports")
Signed-off-by: Joseph Telaak <joseph@xxxxxxxxxx>
Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
Thanks Joseph!
--
Florian