[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a2fb20f-3112-ce9d-abf8-f0a1e0f80656@gmail.com>
Date: Tue, 24 Nov 2020 16:30:03 +0200
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Eric Dumazet <edumazet@...gle.com>,
Herbert Xu <herbert@...dor.apana.org.au>
Cc: Tariq Toukan <tariqt@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>,
Moshe Shemesh <moshe@...dia.com>,
Maxim Mikityanskiy <maximmi@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [PATCH net] netdevice.h: Fix unintentional disable of ALL_FOR_ALL
features on upper device
On 11/24/2020 12:48 PM, Eric Dumazet wrote:
> On Mon, Nov 23, 2020 at 5:15 PM Tariq Toukan <ttoukan.linux@...il.com> wrote:
>>
>>
>>
>> On 11/23/2020 4:55 PM, Eric Dumazet wrote:
>>> On Mon, Nov 23, 2020 at 3:13 PM Tariq Toukan <tariqt@...dia.com> wrote:
>>>>
>>>> Calling netdev_increment_features() on upper/master device from
>>>> netdev_add_tso_features() implies unintentional clearance of ALL_FOR_ALL
>>>> features supported by all slaves. Fix it by passing ALL_FOR_ALL in
>>>> addition to ALL_TSO.
>>>>
>>>> Fixes: b0ce3508b25e ("bonding: allow TSO being set on bonding master")
>>>
>>> I think you should give more details to your bug report, because
>>> netdev_add_tso_features() is used from different
>>> places.
>>>
>>> Thanks.
>>>
>>
>> Right. I'll include these in the re-spin:
>> Fixes: 247f6d0f8667 ("team: allow TSO being set on master")
>> Fixes: f902e8812ef6 ("bridge: Add ability to enable TSO")
>
> I was more thinking about what exact issue you had, and how we can
> reproduce it, and test the fix.
>
Issue reproduction is very simple:
Pick any of the features under ALL_FOR_ALL, like tx-nocache-copy.
Turn it on for all slaves.
Turn it on for the bond.
You'll still not be able to use it:
tx-nocache-copy: off [requested on]
Reason is that the call to netdev_add_tso_features() being considered as
a "dummy" slave that has this feature bit cleared, breaking ALL_FOR_ALL
logic.
>>
>> I wonder though if netdev_increment_features() is expected to clear
>> features that are not part of the mask.
>
> Well, the 'increment' part was suggesting the function was adding
> flags, not removing them.
>
Yes, that's confusing... Although ALL_FOR_ALL logic is just about
removing, unlike ONE_FOR_ALL.
> We might ask Herbert Xu if we :
>
> 1) Need to comment the function, or change its name to be more descriptive.
> 2) Change the behavior (as you suggested)
> 3) Other choice.
>
Powered by blists - more mailing lists