public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic•com>
To: "'Stephen Hemminger'" <stephen@networkplumber•org>
Cc: <netdev@vger•kernel.org>, <davem@davemloft•net>,
	<edumazet@google•com>, <kuba@kernel•org>, <pabeni@redhat•com>,
	<andrew@lunn•ch>, <mengyuanlou@net-swift•com>
Subject: RE: [PATCH net-next 1/3] net: libwx: support hardware statistics
Date: Wed, 20 Sep 2023 15:27:30 +0800	[thread overview]
Message-ID: <002601d9eb93$ea6d1ec0$bf475c40$@trustnetic.com> (raw)
In-Reply-To: <20230918082309.7e592c7c@hermes.local>

On Monday, September 18, 2023 11:23 PM, Stephen Hemminger wrote:
> On Mon, 18 Sep 2023 15:21:06 +0800
> Jiawen Wu <jiawenwu@trustnetic•com> wrote:
> 
> > +
> > +struct wx_stats {
> > +	char stat_string[ETH_GSTRING_LEN];
> > +	int type;
> > +	int sizeof_stat;
> > +	int stat_offset;
> > +};
> 
> Type here is an enum. Therefore for type safety you should use that
> enum for the type field rather than int.
> 
> Since offset and size can never be negative, why not use offset_t and size_t instead.
> 

Do you mean off_t ?


  reply	other threads:[~2023-09-20  7:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18  7:21 [PATCH net-next 0/3] Wangxun ethtool stats Jiawen Wu
2023-09-18  7:21 ` [PATCH net-next 1/3] net: libwx: support hardware statistics Jiawen Wu
2023-09-18 15:23   ` Stephen Hemminger
2023-09-20  7:27     ` Jiawen Wu [this message]
2023-09-19 10:08   ` Paolo Abeni
2023-09-18  7:21 ` [PATCH net-next 2/3] net: txgbe: add ethtool stats support Jiawen Wu
2023-09-18  7:21 ` [PATCH net-next 3/3] net: ngbe: " Jiawen Wu

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='002601d9eb93$ea6d1ec0$bf475c40$@trustnetic.com' \
    --to=jiawenwu@trustnetic$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=mengyuanlou@net-swift$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox