> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Wednesday, June 24, 2020 11:51 PM
> To: Dumitrescu, Cristian <cristian.dumitre...@intel.com>; Alan Dewar
> <alan.de...@att.com>; Singh, Jasvinder <jasvinder.si...@intel.com>
> Cc: Stephen Hemminger <step...@networkplumber.org>; dev@dpdk.org;
> Alan Dewar <alangordonde...@gmail.com>
> Subject: Re: [dpdk-dev] [PATCH] sched: add 64-bit counter retrieval API
> 
> Is this old patch still relevant?
> 
> 
> 25/07/2018 11:02, Alan Dewar:
> > Hi Stephen,
> >
> > Sorry about the delay in responding to your comment.
> >
> > Maybe I'm missing something but I don't consider 64-bit counter
> > rollover to be a problem.
> > The DPDK QoS stats are just 32-bits wide and are zeroed when read.  So
> > if we read them frequently enough the 32-bit counters won't wrap.
> >
> > This new API is just a convenient way to read the 32-bit counters into
> > variables that are 64-bit wide which allows Vyatta to have a common
> > API slightly above the DPDK.
> >
> > I'd hope that at some point in time the DPDK will move to 64-bit
> > counters, but there may be technical reasons why this can't happen
> > that I'm not aware of (support for 32-bit CPUs??)
> >
> > Regards
> > Alan
> >
> > On Mon, Jul 23, 2018 at 5:52 PM, Stephen Hemminger
> > <step...@networkplumber.org> wrote:
> > > On Wed, 18 Jul 2018 15:51:39 +0100
> > > alangordonde...@gmail.com wrote:
> > >
> > >> From: Alan Dewar <alan.de...@att.com>
> > >>
> > >> Add new APIs to retrieve counters in 64-bit wide fields.
> > >>
> > >> Signed-off-by: Alan Dewar <alan.de...@att.com>
> > >
> > > Do you want to consider 64 bit counter roll over on 32 bit platform?
> > > The problem is that incrementing an 64 bit value is not atomic on
> > > 32 bit cpu. The carry operation can race with reading.
> > >
> > > The kernel has special case code to do restartable sequence for
> > > accessing 64 bit counter on 32 bit CPU. These functions become nop's
> > > on 64bit.
> >

The stats params have been converted into 64 bit values during library rework 
last year. Therefore, patch is not relevant anymore.

Thank you,
Jasvinder
 

Reply via email to