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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986FA68BC030EFE80A20471E5ADA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Mon, 15 Dec 2025 08:51:08 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Haas, Cody" <chaas@...tgames.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>
CC: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "andrew+netdev@...n.ch"
	<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Haas, Cody"
	<chaas@...tgames.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net v2 0/1] ice: Fix persistent
 failure in ice_get_rxfh



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Cody Haas
> Sent: Saturday, December 13, 2025 1:22 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; andrew+netdev@...n.ch;
> davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com;
> netdev@...r.kernel.org; Haas, Cody <chaas@...tgames.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2 0/1] ice: Fix persistent
> failure in ice_get_rxfh
> 
> Several ioctl functions have the ability to call ice_get_rxfh, however
> all of these ioctl functions do not provide all of the expected
> information in ethtool_rxfh_param. For example, ethtool_get_rxfh_indir
> does not provide an rss_key. This previously caused
> ethtool_get_rxfh_indir to always fail with -EINVAL.
> 
> This change draws inspiration from i40e_get_rss to handle this
> situation, by only calling the appropriate rss helpers when the
> necessary information has been provided via ethtool_rxfh_param.
> 
> Fixes: b66a972abb6b ("ice: Refactor ice_set/get_rss into LUT and key
> specific functions")
> Signed-off-by: Cody Haas <chaas@...tgames.com>
> Closes: https://lore.kernel.org/intel-wired-lan/CAH7f-
> UKkJV8MLY7zCdgCrGE55whRhbGAXvgkDnwgiZ9gUZT7_w@...l.gmail.com/
> ---
>  drivers/net/ethernet/intel/ice/ice.h         |  1 +
>  drivers/net/ethernet/intel/ice/ice_ethtool.c |  6 +----
>  drivers/net/ethernet/intel/ice/ice_main.c    | 28
> ++++++++++++++++++++
>  3 files changed, 30 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice.h
> b/drivers/net/ethernet/intel/ice/ice.h
> index c9104b13e1d2..87f4098324ed 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -953,6 +953,7 @@ void ice_map_xdp_rings(struct ice_vsi *vsi);  int
> ice_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
>  	     u32 flags);
> +int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16
> lut_size);
>  int ice_set_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size);  int
> ice_get_rss_lut(struct ice_vsi *vsi, u8 *lut, u16 lut_size);  int
> ice_set_rss_key(struct ice_vsi *vsi, u8 *seed); diff --git
> a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index b0805704834d..a5c139cc536d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3649,11 +3649,7 @@ ice_get_rxfh(struct net_device *netdev, struct
> ethtool_rxfh_param *rxfh)
>  	if (!lut)
>  		return -ENOMEM;
> 
> -	err = ice_get_rss_key(vsi, rxfh->key);
> -	if (err)
> -		goto out;
> -
> -	err = ice_get_rss_lut(vsi, lut, vsi->rss_table_size);
> +	err = ice_get_rss(vsi, rxfh->key, lut, vsi->rss_table_size);
>  	if (err)
>  		goto out;
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c
> b/drivers/net/ethernet/intel/ice/ice_main.c
> index b084839eb811..c653029f07c1 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -8072,6 +8072,34 @@ int ice_get_rss_key(struct ice_vsi *vsi, u8
> *seed)
>  	return status;
>  }
> 
> +/**
> + * ice_get_rss - Get RSS LUT and/or key
> + * @vsi: Pointer to VSI structure
> + * @seed: Buffer to store the key in
> + * @lut: Buffer to store the lookup table entries
> + * @lut_size: Size of buffer to store the lookup table entries
> + *
> + * Returns 0 on success, negative on failure  */ int
> ice_get_rss(struct
> +ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) {
> +	int err;
> +
> +	if (seed) {
> +		err = ice_get_rss_key(vsi, seed);
> +		if (err)
> +			return err;
> +	}
> +
> +	if (lut) {
> +		err = ice_get_rss_lut(vsi, lut, lut_size);
> +		if (err)
> +			return err;
> +	}
> +
> +	return 0;
> +}
> +
>  /**
>   * ice_set_rss_hfunc - Set RSS HASH function
>   * @vsi: Pointer to VSI structure
> --
> 2.51.1

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ