> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Simon Horman > Sent: Tuesday, August 26, 2025 6:35 PM > To: Kitszel, Przemyslaw <[email protected]> > Cc: [email protected]; Nguyen, Anthony L > <[email protected]>; [email protected]; Greg KH > <[email protected]>; Kyle, Jeremiah <[email protected]>; > Pepiak, Leszek <[email protected]>; Czapnik, Lukasz > <[email protected]>; Loktionov, Aleksandr > <[email protected]> > Subject: Re: [Intel-wired-lan] [PATCH iwl-net 1/8] i40e: add validation for > ring_len param > > On Wed, Aug 13, 2025 at 12:45:11PM +0200, Przemek Kitszel wrote: > > From: Lukasz Czapnik <[email protected]> > > > > The `ring_len` parameter provided by the virtual function (VF) is > > assigned directly to the hardware memory context (HMC) without any > > validation. > > > > To address this, introduce an upper boundary check for both Tx and Rx > > queue lengths. The maximum number of descriptors supported by the > > hardware is 8k-32. > > Additionally, enforce alignment constraints: Tx rings must be a > > multiple of 8, and Rx rings must be a multiple of 32. > > > > Fixes: 5c3c48ac6bf5 ("i40e: implement virtual device interface") > > Cc: [email protected] > > Signed-off-by: Lukasz Czapnik <[email protected]> > > Reviewed-by: Aleksandr Loktionov <[email protected]> > > Signed-off-by: Przemek Kitszel <[email protected]> > > Reviewed-by: Simon Horman <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
