Subject: Re: [PATCH] Make possible speeds known to ethtool

From: Jeff Garzik <[email-masked]>
Date: Thu, 08 Jan 2009 22:58:17 -0500

Herbert Xu wrote:
> Jeff Garzik <[email-masked]> wrote:
>> The person who added this should have used the new flags interface, and 
>> added ETH_FLAG_GRO right next to the pre-existing ETH_FLAG_LRO.
>>
>> It is incorrect to add new ioctls just to toggle a boolean value.
> 
> Well you missed my earlier explanation.  GRO is a stack flag,
> it's not something we want the device drivers to touch at all.
> 
> The generic flags interface appears to be designed for flags
> that the device driver directly controls, such as LRO.  That's
> why it is inappropriate for GRO, which like GSO is entirely done
> in software.

Nope, the generic flags interface is for any time you have a boolean 
flag to control on a per-interface basis.

The generic flags interface was created precisely because it is silly to 
keep creating _two_ ethtool sub-ioctls (get, set) just for single 
boolean flags.

For generic net stack flags outside the driver's control, that can 
easily be added to ethtool_{get,set}_flags() overriding or ignoring 
whatever the driver may have done.

	Jeff