Re: [PATCH v4 1/1] i40e: validate ring_len parameter against hardware-specific values
From: Gregory Herrero
Date: Fri Dec 12 2025 - 15:20:38 EST
On Mon, Nov 17, 2025 at 11:58:48AM +0000, Loktionov, Aleksandr wrote:
>
>
> > -----Original Message-----
> > From: gregory.herrero@xxxxxxxxxx <gregory.herrero@xxxxxxxxxx>
> > Sent: Monday, November 17, 2025 9:33 AM
> > To: Loktionov, Aleksandr <aleksandr.loktionov@xxxxxxxxx>; Nguyen,
> > Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw
> > <przemyslaw.kitszel@xxxxxxxxx>; andrew+netdev@xxxxxxx;
> > davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> > pabeni@xxxxxxxxxx
> > Cc: intel-wired-lan@xxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; Gregory Herrero <gregory.herrero@xxxxxxxxxx>
> > Subject: [PATCH v4 1/1] i40e: validate ring_len parameter against
> > hardware-specific values
> >
> > From: Gregory Herrero <gregory.herrero@xxxxxxxxxx>
> >
> > The maximum number of descriptors supported by the hardware is
> > hardware dependent and can be retrieved using
> First paragraph uses “hardware dependent” (no hyphen) while later text uses “hardware‑specific” (hyphenated).
> Prefer “hardware‑dependent” for consistency.
>
I will address in v5
> > i40e_get_max_num_descriptors().
> > Move this function to a shared header and use it when checking for
> > valid ring_len parameter rather than using hardcoded value.
> >
> > By fixing an over-acceptance issue, behavior change could be seen
> > where ring_len could now be rejected while configuring rx and tx
> > queues if its size is larger than the hardware-specific maximum number
> > of descriptors.
> >
> The message explains the behavioral change but does not state how the change was tested
> (e.g., which MAC types exercised, ethtool -G paths, VF configuration via virtchnl, acceptance/rejection boundaries).
> Netdev routinely asks for this when behavior changes.
>
In the meantime, Rafal Romanowski tested it so I will add:
Tested-by: Rafal Romanowski <rafal.romanowski@xxxxxxxxx>
Let me know if that's enough or if more details are required.
Thanks,
Gregory