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
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.
> 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/
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
> +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
5 matches
Mail list logo