On 11/25/2020 5:25 AM, Herbert Xu wrote:
On Tue, Nov 24, 2020 at 11:48:35AM +0100, Eric Dumazet wrote:
Well, the 'increment' part was suggesting the function was adding
flags, not removing them.
The idea of the increment part is that we're adding a constituent
device, not that we're adding features. There have always been
features which were conjunctions, i.e., they must be supported by
all underlying devices for them to be enabled on the virtual device.
Your use of the increment function is unusual, as you're not adding
features that belong to one underlying device, but rather you're
trying to enable a feature on the virtual device unconditionally.
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.
I think Tariq's patch is fine, although a comment should be added
to netdev_add_tso_features as this use of the increment function
is nonstandard.
Thanks Herbert, I'll add a comment and re-spin.
Thanks,