[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pn28kkp9.fsf@waldekranz.com>
Date: Thu, 14 Jan 2021 09:05:06 +0100
From: Tobias Waldekranz <tobias@...dekranz.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, andrew@...n.ch,
vivien.didelot@...il.com, f.fainelli@...il.com,
j.vosburgh@...il.com, vfalico@...il.com, andy@...yhouse.net,
netdev@...r.kernel.org
Subject: Re: [PATCH v5 net-next 4/5] net: dsa: mv88e6xxx: Link aggregation support
On Thu, Jan 14, 2021 at 02:50, Vladimir Oltean <olteanv@...il.com> wrote:
> 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@...dekranz.com>
>> ---
>
> Reviewed-by: Vladimir Oltean <olteanv@...il.com>
Thanks!
>> +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.
Powered by blists - more mailing lists