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: <IA3PR11MB89866DFD14FFD9AB3550AE32E5FCA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Mon, 27 Oct 2025 07:16:15 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Kohei Enju <enjuk@...zon.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	"kohei.enju@...il.com" <kohei.enju@...il.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v1 2/3] igc: expose RSS key via
 ethtool get_rxfh



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Kohei Enju
> Sent: Saturday, October 25, 2025 5:02 PM
> To: intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org
> Cc: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo
> Abeni <pabeni@...hat.com>; kohei.enju@...il.com; Kohei Enju
> <enjuk@...zon.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v1 2/3] igc: expose RSS key
> via ethtool get_rxfh
> 
> Implement igc_ethtool_get_rxfh_key_size() and extend
> igc_ethtool_get_rxfh() to return the RSS key to userspace.
> 
> This can be tested using `ethtool -x <dev>`.
> 
> Signed-off-by: Kohei Enju <enjuk@...zon.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_ethtool.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index f89c2cbaace0..0482e590bc5a 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -1490,6 +1490,11 @@ void igc_write_rss_indir_tbl(struct igc_adapter
> *adapter)
>  	}
>  }
> 
> +static u32 igc_ethtool_get_rxfh_key_size(struct net_device *netdev) {
> +	return IGC_RSS_KEY_SIZE;
> +}
> +
>  static u32 igc_ethtool_get_rxfh_indir_size(struct net_device *netdev)
> {
>  	return IGC_RETA_SIZE;
> @@ -1502,10 +1507,13 @@ static int igc_ethtool_get_rxfh(struct
> net_device *netdev,
>  	int i;
> 
>  	rxfh->hfunc = ETH_RSS_HASH_TOP;
> -	if (!rxfh->indir)
> -		return 0;
> -	for (i = 0; i < IGC_RETA_SIZE; i++)
> -		rxfh->indir[i] = adapter->rss_indir_tbl[i];
> +
> +	if (rxfh->indir)
> +		for (i = 0; i < IGC_RETA_SIZE; i++)
> +			rxfh->indir[i] = adapter->rss_indir_tbl[i];
> +
> +	if (rxfh->key)
> +		memcpy(rxfh->key, adapter->rss_key, sizeof(adapter-
> >rss_key));
> 
>  	return 0;
>  }
> @@ -2182,6 +2190,7 @@ static const struct ethtool_ops igc_ethtool_ops
> = {
>  	.set_coalesce		= igc_ethtool_set_coalesce,
>  	.get_rxnfc		= igc_ethtool_get_rxnfc,
>  	.set_rxnfc		= igc_ethtool_set_rxnfc,
> +	.get_rxfh_key_size	= igc_ethtool_get_rxfh_key_size,
>  	.get_rxfh_indir_size	= igc_ethtool_get_rxfh_indir_size,
>  	.get_rxfh		= igc_ethtool_get_rxfh,
>  	.set_rxfh		= igc_ethtool_set_rxfh,
> --
> 2.51.0

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ