[Intel-wired-lan] [iwl-next v7 2/9] ice: devlink PF MSI-X max and min parameter

Michal Schmidt mschmidt at redhat.com
Mon Nov 11 11:44:11 UTC 2024


On Mon, Nov 4, 2024 at 1:13 PM Michal Swiatkowski
<michal.swiatkowski at linux.intel.com> wrote:
>
> Use generic devlink PF MSI-X parameter to allow user to change MSI-X
> range.
>
> Add notes about this parameters into ice devlink documentation.
>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski at linux.intel.com>
> ---
>  Documentation/networking/devlink/ice.rst      | 11 +++
>  .../net/ethernet/intel/ice/devlink/devlink.c  | 83 ++++++++++++++++++-
>  drivers/net/ethernet/intel/ice/ice.h          |  7 ++
>  drivers/net/ethernet/intel/ice/ice_irq.c      |  7 ++
>  4 files changed, 107 insertions(+), 1 deletion(-)
>
[...]
> @@ -1648,6 +1710,7 @@ void ice_devlink_unregister(struct ice_pf *pf)
>  int ice_devlink_register_params(struct ice_pf *pf)
>  {
>         struct devlink *devlink = priv_to_devlink(pf);
> +       union devlink_param_value value;
>         struct ice_hw *hw = &pf->hw;
>         int status;
>
> @@ -1656,11 +1719,27 @@ int ice_devlink_register_params(struct ice_pf *pf)
>         if (status)
>                 return status;
>
> +       status = devl_params_register(devlink, ice_dvl_msix_params,
> +                                     ARRAY_SIZE(ice_dvl_msix_params));
> +       if (status)
> +               return status;
> +
>         if (hw->func_caps.common_cap.tx_sched_topo_comp_mode_en)
>                 status = devl_params_register(devlink, ice_dvl_sched_params,
>                                               ARRAY_SIZE(ice_dvl_sched_params));
> +       if (status)
> +               return status;

Error handling looks wrong in this function.
You have to unwind the registration of the params from above or they will leak.
Sorry I did not notice this earlier.

Michal



More information about the Intel-wired-lan mailing list