diff options
author | David S. Miller <davem@davemloft.net> | 2021-03-19 02:24:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-19 02:24:06 +0300 |
commit | d7417ee918582504076ec1a74dfcd5fe1f55696c (patch) | |
tree | e0e8d1fdd9057a55b413cb637f53e6a2f1b6d1eb /net/dsa/dsa_priv.h | |
parent | 44b958a686183287d0b8977a6700f956c82bef94 (diff) | |
parent | 8d1d8298eb00756cc525e12a133a5cc37cfdf992 (diff) | |
download | linux-d7417ee918582504076ec1a74dfcd5fe1f55696c.tar.xz |
Merge branch 'mv88e6xxx-offload-bridge-flags'
Tobias Waldekranz says:
====================
net: dsa: mv88e6xxx: Offload bridge port flags
Add support for offloading learning and broadcast flooding flags. With
this in place, mv88e6xx supports offloading of all bridge port flags
that are currently supported by the bridge.
Broadcast flooding is somewhat awkward to control as there is no
per-port bit for this like there is for unknown unicast and unknown
multicast. Instead we have to update the ATU entry for the broadcast
address for all currently used FIDs.
v2 -> v3:
- Only return a netdev from dsa_port_to_bridge_port if the port is
currently bridged (Vladimir & Florian)
v1 -> v2:
- Ensure that mv88e6xxx_vtu_get handles VID 0 (Vladimir)
- Fixed off-by-one in mv88e6xxx_port_set_assoc_vector (Vladimir)
- Fast age all entries on port when disabling learning (Vladimir)
- Correctly detect bridge flags on LAG ports (Vladimir)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r-- | net/dsa/dsa_priv.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 9d4b0e9b1aa1..4c43c5406834 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -233,19 +233,7 @@ extern const struct phylink_mac_ops dsa_port_phylink_mac_ops; static inline bool dsa_port_offloads_bridge_port(struct dsa_port *dp, struct net_device *dev) { - /* Switchdev offloading can be configured on: */ - - if (dev == dp->slave) - /* DSA ports directly connected to a bridge, and event - * was emitted for the ports themselves. - */ - return true; - - if (dp->lag_dev == dev) - /* DSA ports connected to a bridge via a LAG */ - return true; - - return false; + return dsa_port_to_bridge_port(dp) == dev; } static inline bool dsa_port_offloads_bridge(struct dsa_port *dp, |