On Wed, Jan 13, 2021 at 09:42:54AM +0100, Tobias Waldekranz wrote:
Support offloading of LAGs to hardware. LAGs may be attached to a
bridge in which case VLANs, multicast groups, etc. are also offloaded
as usual.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
quoted hunk ↗ jump to hunk
+static bool mv88e6xxx_lag_can_offload(struct dsa_switch *ds,
+ struct net_device *lag,
+ struct netdev_lag_upper_info *info)
+{
+ struct dsa_port *dp;
+ int id, members = 0;
+
+ id = dsa_lag_id(ds->dst, lag);
+ if (id < 0 || id >= ds->num_lag_ids)
This "id >= ds->num_lag_ids" condition is there just in the off chance
that the mv88e6xxx could be bridged in the same DSA tree with another
device that reports a higher ds->num_lag_ids such that dst->lags_len
picks up that larger maximum, but otherwise the two switches have the
same understanding of the LAG ID, and are compatible with one another?
That sounds... plausible?