mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Breno Leitao <leitao@debian.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [Intel-wired-lan] [PATCH net-next] net: ixgbe: convert to use .get_rx_ring_count
Date: Wed, 12 Nov 2025 11:35:58 +0100	[thread overview]
Message-ID: <73e29237-4937-4cc7-9830-427bf7464591@molgen.mpg.de> (raw)
In-Reply-To: <20251112-ixgbe_gxrings-v1-1-960e139697fa@debian.org>

Dear Breno,


Thank you for your patch.

Am 12.11.25 um 11:23 schrieb Breno Leitao:
> 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.

Maybe add a paragraph how you tested this.

> Signed-off-by: Breno Leitao <leitao@debian.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,

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul

  reply	other threads:[~2025-11-12 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 10:23 Breno Leitao
2025-11-12 10:35 ` Paul Menzel [this message]
2025-11-12 13:04 ` [Intel-wired-lan] " Loktionov, Aleksandr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73e29237-4937-4cc7-9830-427bf7464591@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®