lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 net-next 09/15] net: dsa: Never offload FDB entries on standalone ports
Date
On Tue, Mar 15, 2022 at 18:33, Vladimir Oltean <olteanv@gmail.com> wrote:
> On Tue, Mar 15, 2022 at 01:25:37AM +0100, Tobias Waldekranz wrote:
>> If a port joins a bridge that it can't offload, it will fallback to
>> standalone mode and software bridging. In this case, we never want to
>> offload any FDB entries to hardware either.
>>
>> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
>> ---
>
> When you resend, please send this patch separately, unless something
> breaks really ugly with your MST series in place.

Sure. I found this while testing the software fallback. It prevents a
segfault in dsa_port_bridge_host_fdb_add, which (rightly, I think)
assumes that dp->bridge is valid. I feel like this should have a Fixes:
tag, but I'm not sure which commit to blame. Any suggestions?

>> net/dsa/slave.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
>> index a61a7c54af20..647adee97f7f 100644
>> --- a/net/dsa/slave.c
>> +++ b/net/dsa/slave.c
>> @@ -2624,6 +2624,9 @@ static int dsa_slave_fdb_event(struct net_device *dev,
>> if (ctx && ctx != dp)
>> return 0;
>>
>> + if (!dp->bridge)
>> + return 0;
>> +
>> if (switchdev_fdb_is_dynamically_learned(fdb_info)) {
>> if (dsa_port_offloads_bridge_port(dp, orig_dev))
>> return 0;
>> --
>> 2.25.1
>>

\
 
 \ /
  Last update: 2022-03-15 23:27    [W:0.669 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site