On Mon, Nov 4, 2024 at 1:13 PM Michal Swiatkowski <[email protected]> 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 <[email protected]> > --- > 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
