On Mon, Oct 28, 2024 at 11:04 AM 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. > > Reviewed-by: Wojciech Drewek <[email protected]> > 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(-) > ... > @@ -1526,6 +1548,37 @@ static int ice_devlink_local_fwd_validate(struct > devlink *devlink, u32 id, > return 0; > } > > +static int > +ice_devlink_msix_max_pf_validate(struct devlink *devlink, u32 id, > + union devlink_param_value val, > + struct netlink_ext_ack *extack) > +{ > + struct ice_pf *pf = devlink_priv(devlink); > + > + if (val.vu16 > pf->hw.func_caps.common_cap.num_msix_vectors || > + val.vu16 < pf->msix.min) { > + NL_SET_ERR_MSG_MOD(extack, "Value is invalid"); > + return -EINVAL; > + } > + > + return 0; > +} > + > +static int > +ice_devlink_msix_min_pf_validate(struct devlink *devlink, u32 id, > + union devlink_param_value val, > + struct netlink_ext_ack *extack) > +{ > + struct ice_pf *pf = devlink_priv(devlink); > + > + if (val.vu16 <= ICE_MIN_MSIX || val.vu16 > pf->msix.max) {
Shouldn't this be "<" instead of "<=" ? Michal
