Thread (10 messages) flat view 10 messages, 3 authors, 2021-01-15

Re: [PATCH v5 net-next 4/5] net: dsa: mv88e6xxx: Link aggregation support

From: Tobias Waldekranz <tobias@waldekranz.com>
Date: 2021-01-14 08:06:02

On Thu, Jan 14, 2021 at 02:50, Vladimir Oltean [off-list ref] wrote:
On Wed, Jan 13, 2021 at 09:42:54AM +0100, Tobias Waldekranz wrote:
quoted
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>
Thanks!
quoted
+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?
Exactly so.
That sounds... plausible?
While improbable, it is possible. Older 6xxx chips can only handle 16
LAGs, newer chips can handle up to 32. This is not supported by the
driver at the moment - still it felt easier to add the check now, rather
than having the future developer chase down the resulting bug in five
years when they add that support.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help