[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyhxvW7K6v7QxD3H@mev-dev.igk.intel.com>
Date: Mon, 4 Nov 2024 08:03:25 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Michal Schmidt <mschmidt@...hat.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
pawel.chmielewski@...el.com, sridhar.samudrala@...el.com,
jacob.e.keller@...el.com, pio.raczynski@...il.com,
konrad.knitter@...el.com, marcin.szycik@...el.com,
wojciech.drewek@...el.com, nex.sw.ncis.nat.hpm.dev@...el.com,
przemyslaw.kitszel@...el.com, jiri@...nulli.us, horms@...nel.org,
David.Laight@...lab.com
Subject: Re: [Intel-wired-lan] [iwl-next v6 2/9] ice: devlink PF MSI-X max
and min parameter
On Thu, Oct 31, 2024 at 10:58:03PM +0100, Michal Schmidt wrote:
> On Mon, Oct 28, 2024 at 11:04 AM Michal Swiatkowski
> <michal.swiatkowski@...ux.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.
> >
> > Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.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(-)
> >
> ...
> > @@ -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 "<=" ?
>
Yeah, will fix.
> Michal
>
Powered by blists - more mailing lists