[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <65dd5d8c5e7c48e0ba484711c8676ab7@AcuMS.aculab.com>
Date: Thu, 29 Aug 2019 13:45:57 +0000
From: David Laight <David.Laight@...LAB.COM>
To: "'Li,Rongqing'" <lirongqing@...du.com>,
Ido Schimmel <idosch@...sch.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"idosch@...lanox.com" <idosch@...lanox.com>
Subject: RE: [PATCH][net-next] net: drop_monitor: change the stats variable to
u64 in net_dm_stats_put
From: Li,Rongqing
> Sent: 22 August 2019 13:32
> > On Thu, Aug 22, 2019 at 02:22:33PM +0800, Li RongQing wrote:
> > > only the element drop of struct net_dm_stats is used, so simplify it
> > > to u64
> >
> > Thanks for the patch, but I don't really see the value here. The struct allows for
> > easy extensions in the future. What do you gain from this change? We merely
> > read stats and report them to user space, so I guess it's not about
> > performance either.
> >
>
> I think u64 can reduce to call memset and dereference stats.drop
The compiler should inline the memset().
Also you should have called it 'dropped' not 'stats'.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists