lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADEbmW1EzEVGZnxEQOUngTRKVnQQnU4mpsOoe_E0SeojcF3D6w@mail.gmail.com>
Date: Thu, 31 Oct 2024 22:58:03 +0100
From: Michal Schmidt <mschmidt@...hat.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.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 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 "<=" ?

Michal


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ