From: Stephen Hemminger <stephen@networkplumber.org>
To: Jiawen Wu <jiawenwu@trustnetic.com>
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: Mon, 18 Sep 2023 08:23:09 -0700 [thread overview]
Message-ID: <20230918082309.7e592c7c@hermes.local> (raw)
In-Reply-To: <20230918072108.809020-2-jiawenwu@trustnetic.com>
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.
next prev parent reply other threads:[~2023-09-18 15: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 [this message]
2023-09-20 7:27 ` Jiawen Wu
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=20230918082309.7e592c7c@hermes.local \
--to=stephen@networkplumber.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).