Re: [PATCH net-next 2/2] net: dsa: mxl862xx: implement bridge offloading

From: Jakub Kicinski

Date: Mon Mar 09 2026 - 19:22:10 EST


On Sat, 7 Mar 2026 03:31:17 +0000 Daniel Golle wrote:
> Add support for bridge offloading on the mxl862xx DSA driver.
>
> Implement joining and leaving bridges as well as add, delete and dump
> operations on isolated FDBs and setting a port's STP state.
>
> The switch supports a maximum of 63 bridges, however, up to 12 may
> be used as "single-port bridges" to isolate standalone ports.
> Allowing up to 48 bridges to be offloaded seems more than enough on
> that hardware, hence that is set as max_num_bridges.
>
> A total of 128 bridge ports are supported in the bridge portmap, and
> virtual bridge ports have to be used eg. for link-aggregation, hence
> potentially exceeding the number of hardware ports.
>
> As there are now more users of the BRIDGEPORT_CONFIG_SET API and the
> state of each port is cached locally, introduce a helper function
> mxl862xx_set_bridge_port(struct dsa_switch *ds, int port) which is
> then also be used to replace the direct calls to the API in
> mxl862xx_setup_cpu_bridge() and mxl862xx_add_single_port_bridge(),
> while removing the accidentally added VLAN-aware-learning settings.
>
> Note that there is no convenient way to control flooding on per-port
> level, so the driver is using a QoS meter setup as a stopper in lack
> of any better option. This works, but allows a single 64-byte packet
> to pass once after reset. While this limitation doesn't seem to be a
> problem in practice, it has the effect that the bridge_vlan_unaware.sh
> selftest only passes the FDB test the 2nd time the test is run after
> boot (and any subsequent time after that, of course).

Warning: drivers/net/dsa/mxl862xx/mxl862xx-api.h:145 struct member 'first_bridge_port_id' not described in 'mxl862xx_mac_table_read'
Warning: drivers/net/dsa/mxl862xx/mxl862xx-api.h:806 missing initial short description on line:
* enum mxl862xx_stp_port_state

Also AI has a bunch of endianness complaints:
https://netdev-ai.bots.linux.dev/ai-review.html?id=b924beb1-9dec-4afb-ae21-5585ec8e7667
--
pw-bot: cr