Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-27 Thread Dan Gora
On Thu, Sep 27, 2018 at 7:04 PM, Ferruh Yigit wrote: >> >> With no traffic it's worse because the worker threads perform these >> increments even more often! > > Dear Dan, > > Your implementation doesn't prevent the race when there is traffic, it can be Correct. To do that would require per-cpu

Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-27 Thread Ferruh Yigit
On 9/27/2018 4:53 PM, Dan Gora wrote: > On Thu, Sep 27, 2018 at 8:40 AM Ferruh Yigit wrote: Not sure about introducing an extra check to datapath for possible error on stats zero. I am for dropping this patch, what do you think? >>> >>> This is literally adding one instruction to the dat

Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-27 Thread Dan Gora
On Thu, Sep 27, 2018 at 8:40 AM Ferruh Yigit wrote: > >> Not sure about introducing an extra check to datapath for possible error on > >> stats zero. I am for dropping this patch, what do you think? > > > > This is literally adding one instruction to the datapath. Not even an > > atomic instructi

Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-27 Thread Ferruh Yigit
On 9/26/2018 3:48 PM, Dan Gora wrote: > On Wed, Sep 26, 2018 at 11:01 AM, Ferruh Yigit wrote: >> On 9/19/2018 8:55 PM, Dan Gora wrote: >>> The worker threads incrementing the rx/tx_packets race with the signal >>> handler from the main thread zeroing the entire statistics structure. >>> This can c

Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-26 Thread Dan Gora
On Wed, Sep 26, 2018 at 11:01 AM, Ferruh Yigit wrote: > On 9/19/2018 8:55 PM, Dan Gora wrote: >> The worker threads incrementing the rx/tx_packets race with the signal >> handler from the main thread zeroing the entire statistics structure. >> This can cause the statistics to fail to be zeroed, ev

Re: [dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-26 Thread Ferruh Yigit
On 9/19/2018 8:55 PM, Dan Gora wrote: > The worker threads incrementing the rx/tx_packets race with the signal > handler from the main thread zeroing the entire statistics structure. > This can cause the statistics to fail to be zeroed, even when there > is no traffic on those interfaces. > > Impr

[dpdk-dev] [PATCH v2 5/5] examples/kni: improve zeroing statistics

2018-09-19 Thread Dan Gora
The worker threads incrementing the rx/tx_packets race with the signal handler from the main thread zeroing the entire statistics structure. This can cause the statistics to fail to be zeroed, even when there is no traffic on those interfaces. Improve zeroing the statistics by only incrementing rx