Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-27 Thread Meade, Niall
>On 9/26/2024 3:03 PM, Meade, Niall wrote: >>> From: Ferruh Yigit >>> Sent: Thursday, September 26, 2024 12:16 AM >>> To: Meade, Niall ; Thomas Monjalon >>> ; Andrew Rybchenko ; >>> Roman Zhukov >>> Cc: dev@dpdk.org >>> Su

Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-27 Thread Meade, Niall
> From: Ferruh Yigit > Sent: Thursday, September 26, 2024 12:16 AM > To: Meade, Niall ; Thomas Monjalon > ; Andrew Rybchenko ; > Roman Zhukov > Cc: dev@dpdk.org > Subject: Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic > > The resolution invo

Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-27 Thread Ferruh Yigit
> Roman Zhukov >>>> Cc: dev@dpdk.org >>>> Subject: Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic >>> >>>>> The resolution involves upcasting nb_desc to a uint32_t before the >>>>> RTE_ALIGN_CEIL macro is applied

Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-26 Thread Ferruh Yigit
On 9/26/2024 3:03 PM, Meade, Niall wrote: >> From: Ferruh Yigit >> Sent: Thursday, September 26, 2024 12:16 AM >> To: Meade, Niall ; Thomas Monjalon >> ; Andrew Rybchenko ; >> Roman Zhukov >> Cc: dev@dpdk.org >> Subject: Re: [PATCH v1] ethdev:

Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-25 Thread Ferruh Yigit
On 9/23/2024 10:26 AM, Niall Meade wrote: > Addressed a specific overflow issue in the eth_dev_adjust_nb_desc() > function where the uint16_t variable nb_desc would overflow when its > value was greater than (2^16 - nb_align). This overflow caused nb_desc > to incorrectly wrap around between 0 and

[PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-23 Thread Niall Meade
Addressed a specific overflow issue in the eth_dev_adjust_nb_desc() function where the uint16_t variable nb_desc would overflow when its value was greater than (2^16 - nb_align). This overflow caused nb_desc to incorrectly wrap around between 0 and nb_align-1, leading to the function setting nb_des

Re: [PATCH v1] ethdev: fix int overflow in descriptor count logic

2024-09-23 Thread Andrew Rybchenko
On 9/23/24 12:26, Niall Meade wrote: Addressed a specific overflow issue in the eth_dev_adjust_nb_desc() function where the uint16_t variable nb_desc would overflow when its value was greater than (2^16 - nb_align). This overflow caused nb_desc to incorrectly wrap around between 0 and nb_align-1,