Subject: Re: [net-next-2.6 PATCH v2] ethtool: Add direct access to ops->get_sset_count

From: Ben Hutchings <[email-masked]>
Date: Sat, 27 Feb 2010 04:37:14 +0000

On Fri, 2010-02-26 at 19:49 -0800, Jeff Kirsher wrote:
> From: Jeff Garzik <[email-masked]>
> 
> This patch is an alternative approach for accessing string
> counts, vs. the drvinfo indirect approach.  This way the drvinfo
> space doesn't run out, and we don't break ABI later.
> 
> Signed-off-by: Jeff Garzik <[email-masked]>

Slander!

> Signed-off-by: Peter P Waskiewicz Jr <[email-masked]>
> Signed-off-by: Jeff Kirsher <[email-masked]>
> ---
> 
>  include/linux/ethtool.h |   25 ++++++++++++-----
>  net/core/ethtool.c      |   71 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 89 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index cca1c3d..ff2a49c 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -239,10 +239,10 @@ struct ethtool_pauseparam {
>  
>  #define ETH_GSTRING_LEN		32
>  enum ethtool_stringset {
> -	ETH_SS_TEST		= 0,
> -	ETH_SS_STATS,
> -	ETH_SS_PRIV_FLAGS,
> -	ETH_SS_NTUPLE_FILTERS,
> +	ETH_SS_TEST		= (1 << 0),
> +	ETH_SS_STATS		= (1 << 1),
> +	ETH_SS_PRIV_FLAGS	= (1 << 2),
> +	ETH_SS_NTUPLE_FILTERS	= (1 << 3),
>  };
[...]

This breaks the established ABI for ETHTOOL_GSTRINGS.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.