[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <002601d9eb93$ea6d1ec0$bf475c40$@trustnetic.com>
Date: Wed, 20 Sep 2023 15:27:30 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Stephen Hemminger'" <stephen@...workplumber.org>
Cc: <netdev@...r.kernel.org>,
<davem@...emloft.net>,
<edumazet@...gle.com>,
<kuba@...nel.org>,
<pabeni@...hat.com>,
<andrew@...n.ch>,
<mengyuanlou@...-swift.com>
Subject: RE: [PATCH net-next 1/3] net: libwx: support hardware statistics
On Monday, September 18, 2023 11:23 PM, Stephen Hemminger wrote:
> On Mon, 18 Sep 2023 15:21:06 +0800
> Jiawen Wu <jiawenwu@...stnetic.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 ?
Powered by blists - more mailing lists