lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03479b6cdf2be2eb1da5336e858c44452bc5d88d.camel@nvidia.com>
Date:   Tue, 2 Nov 2021 20:41:54 +0000
From:   Saeed Mahameed <saeedm@...dia.com>
To:     "kuba@...nel.org" <kuba@...nel.org>
CC:     "mkubecek@...e.cz" <mkubecek@...e.cz>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "andrew@...n.ch" <andrew@...n.ch>
Subject: Re: [PATCH net] ethtool: fix ethtool msg len calculation for pause
 stats

On Tue, 2021-11-02 at 11:10 -0700, Jakub Kicinski wrote:
> On Tue, 2 Nov 2021 16:08:52 +0000 Saeed Mahameed wrote:
> > > 
...

> > 
> > maybe we need to separate stats from non-stats, or define
> > ETHTOOL_A_PAUSE_STAT_CNT where it needs to be defined.
> 
> Fair point, something like this?
> 

LGTM

> +++ b/include/uapi/linux/ethtool_netlink.h
> @@ -411,10 +411,14 @@ enum {
>         ETHTOOL_A_PAUSE_STAT_TX_FRAMES,
>         ETHTOOL_A_PAUSE_STAT_RX_FRAMES,
>  
> -       /* add new constants above here */
> +       /* add new constants above here
> +        * adjust ETHTOOL_PAUSE_STAT_CNT if adding non-stats!
> +        */
>         __ETHTOOL_A_PAUSE_STAT_CNT,
>         ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1)
>  };
> +#define ETHTOOL_PAUSE_STAT_CNT (__ETHTOOL_A_PAUSE_STAT_CNT -
>            \
> +                                ETHTOOL_A_PAUSE_STAT_TX_FRAMES)
>  
>  /* EEE */
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ