All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@nvidia.com>
To: "kuba@kernel.org" <kuba@kernel.org>
Cc: "mkubecek@suse.cz" <mkubecek@suse.cz>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>
Subject: Re: [PATCH net] ethtool: fix ethtool msg len calculation for pause stats
Date: Tue, 2 Nov 2021 20:41:54 +0000	[thread overview]
Message-ID: <03479b6cdf2be2eb1da5336e858c44452bc5d88d.camel@nvidia.com> (raw)
In-Reply-To: <20211102111023.6ed54026@kicinski-fedora-PC1C0HJN>

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 */
>  
> 


      reply	other threads:[~2021-11-02 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02  4:21 [PATCH net] ethtool: fix ethtool msg len calculation for pause stats Jakub Kicinski
2021-11-02 16:08 ` Saeed Mahameed
2021-11-02 18:10   ` Jakub Kicinski
2021-11-02 20:41     ` Saeed Mahameed [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03479b6cdf2be2eb1da5336e858c44452bc5d88d.camel@nvidia.com \
    --to=saeedm@nvidia.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.