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] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986B44287480E638CC00A99E5CCA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Wed, 12 Nov 2025 13:04:18 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Breno Leitao <leitao@...ian.org>, "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>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-team@...a.com" <kernel-team@...a.com>
Subject: RE: [Intel-wired-lan] [PATCH net-next] net: ixgbe: convert to use
 .get_rx_ring_count



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Breno Leitao
> Sent: Wednesday, November 12, 2025 11:23 AM
> To: 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>
> Cc: intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; kernel-team@...a.com; Breno Leitao
> <leitao@...ian.org>
> Subject: [Intel-wired-lan] [PATCH net-next] net: ixgbe: convert to use
> .get_rx_ring_count
> 
> Convert the ixgbe driver to use the new .get_rx_ring_count ethtool
> operation for handling ETHTOOL_GRXRINGS command. This simplifies the
> code by extracting the ring count logic into a dedicated callback.
> 
> The new callback provides the same functionality in a more direct way,
> following the ongoing ethtool API modernization.
> 
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> index 2d660e9edb80..2ad81f687a84 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> @@ -2805,6 +2805,14 @@ static int ixgbe_rss_indir_tbl_max(struct
> ixgbe_adapter *adapter)
>  		return 64;
>  }
> 
> +static u32 ixgbe_get_rx_ring_count(struct net_device *dev) {
> +	struct ixgbe_adapter *adapter = ixgbe_from_netdev(dev);
> +
> +	return min_t(u32, adapter->num_rx_queues,
> +		     ixgbe_rss_indir_tbl_max(adapter));
> +}
> +
>  static int ixgbe_get_rxnfc(struct net_device *dev, struct
> ethtool_rxnfc *cmd,
>  			   u32 *rule_locs)
>  {
> @@ -2812,11 +2820,6 @@ static int ixgbe_get_rxnfc(struct net_device
> *dev, struct ethtool_rxnfc *cmd,
>  	int ret = -EOPNOTSUPP;
> 
>  	switch (cmd->cmd) {
> -	case ETHTOOL_GRXRINGS:
> -		cmd->data = min_t(int, adapter->num_rx_queues,
> -				  ixgbe_rss_indir_tbl_max(adapter));
> -		ret = 0;
> -		break;
>  	case ETHTOOL_GRXCLSRLCNT:
>  		cmd->rule_cnt = adapter->fdir_filter_count;
>  		ret = 0;
> @@ -3743,6 +3746,7 @@ static const struct ethtool_ops
> ixgbe_ethtool_ops = {
>  	.get_ethtool_stats      = ixgbe_get_ethtool_stats,
>  	.get_coalesce           = ixgbe_get_coalesce,
>  	.set_coalesce           = ixgbe_set_coalesce,
> +	.get_rx_ring_count	= ixgbe_get_rx_ring_count,
>  	.get_rxnfc		= ixgbe_get_rxnfc,
>  	.set_rxnfc		= ixgbe_set_rxnfc,
>  	.get_rxfh_indir_size	= ixgbe_rss_indir_size,
> @@ -3791,6 +3795,7 @@ static const struct ethtool_ops
> ixgbe_ethtool_ops_e610 = {
>  	.get_ethtool_stats      = ixgbe_get_ethtool_stats,
>  	.get_coalesce           = ixgbe_get_coalesce,
>  	.set_coalesce           = ixgbe_set_coalesce,
> +	.get_rx_ring_count	= ixgbe_get_rx_ring_count,
>  	.get_rxnfc		= ixgbe_get_rxnfc,
>  	.set_rxnfc		= ixgbe_set_rxnfc,
>  	.get_rxfh_indir_size	= ixgbe_rss_indir_size,
> 
> ---
> base-commit: bde974ef62569a7da12aa71d182a760cd6223c36
> change-id: 20251112-ixgbe_gxrings-61c6f71d712b
> 
> Best regards,
> --
> Breno Leitao <leitao@...ian.org>


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ