On 11/24/2020 12:48 PM, Eric Dumazet wrote:
On Mon, Nov 23, 2020 at 5:15 PM Tariq Toukan <ttoukan.li...@gmail.com> wrote:



On 11/23/2020 4:55 PM, Eric Dumazet wrote:
On Mon, Nov 23, 2020 at 3:13 PM Tariq Toukan <tar...@nvidia.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.



Reply via email to