Re: [RFC] net/af_packet: make stats reset reliable

2024-04-28 Thread Mattias Rönnblom
On 2024-04-26 13:33, Morten Brørup wrote: +static uint64_t +stats_get_diff(uint64_t stats, uint64_t offset) +{ + if (stats >= offset) + return stats - offset; + /* unlikely wraparound case */ + return UINT64_MAX + stats - offset; The numbers are unsigned, so wrap

Re: [RFC] net/af_packet: make stats reset reliable

2024-04-26 Thread Patrick Robb
Recheck-request: iol-compile-amd64-testing The DPDK Community Lab updated to the latest Alpine image yesterday, which resulted in all Alpine builds failing. The failure is unrelated to your patch, and this recheck should remove the fail on Patchwork, as we have disabled Alpine testing for now.

RE: [RFC] net/af_packet: make stats reset reliable

2024-04-26 Thread Morten Brørup
> From: Ferruh Yigit [mailto:ferruh.yi...@amd.com] > Sent: Friday, 26 April 2024 15.38 > > On 4/26/2024 12:33 PM, Morten Brørup wrote: [...] > > While reviewing, I came across the rx_mbuf_alloc_failed counter in the > rte_eth_dev_data structure: > > https://elixir.bootlin.com/dpdk/v24.03/source/

Re: [RFC] net/af_packet: make stats reset reliable

2024-04-26 Thread Ferruh Yigit
On 4/26/2024 12:33 PM, Morten Brørup wrote: >> +static uint64_t >> +stats_get_diff(uint64_t stats, uint64_t offset) >> +{ >> +if (stats >= offset) >> +return stats - offset; >> +/* unlikely wraparound case */ >> +return UINT64_MAX + stats - offset; > > The numbers are unsig

RE: [RFC] net/af_packet: make stats reset reliable

2024-04-26 Thread Morten Brørup
> +static uint64_t > +stats_get_diff(uint64_t stats, uint64_t offset) > +{ > + if (stats >= offset) > + return stats - offset; > + /* unlikely wraparound case */ > + return UINT64_MAX + stats - offset; The numbers are unsigned, so wrapping comes for free. Remove the compar