[Intel-wired-lan] [PATCH iwl-net v2] ice: check for unregistering correct number of devlink params

Pucha, HimasekharX Reddy himasekharx.reddy.pucha at intel.com
Mon May 27 08:25:25 UTC 2024


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Dave Ertman
> Sent: Friday, May 24, 2024 2:34 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>; Czapnik, Lukasz <lukasz.czapnik at intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: check for unregistering correct number of devlink params
>
> On module load, the ice driver checks for the lack of a specific PF capability to determine if it should reduce the number of devlink params to register.  One situation when this test returns true is when the driver loads in safe mode.  The same check is not present on the unload path when devlink params are unregistered.  This results in the driver triggering a WARN_ON in the kernel devlink code.
>
> The current check and code path uses a reduction in the number of elements reported in the list of params.  This is fragile and not good for future maintaining.
>
> Change the parameters to be held in two lists, one always registered and one dependent on the check.
>
> Add a symmetrical check in the unload path so that the correct parameters are unregistered as well.
>
> Fixes: 109eb2917284 ("ice: Add tx_scheduling_layers devlink param")
> CC: Lukasz Czapnik <lukasz.czapnik at intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel at intel.com>
> Signed-off-by: Dave Ertman <david.m.ertman at intel.com>
>
> ---
> Changes in v2: break params into two list clean up variable usage
> ---
>  .../net/ethernet/intel/ice/devlink/devlink.c  | 31 +++++++++++++------
>  1 file changed, 22 insertions(+), 9 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha at intel.com> (A Contingent worker at Intel)



More information about the Intel-wired-lan mailing list