netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API
@ 2025-11-13 16:46 Breno Leitao
  2025-11-13 16:46 ` [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc Breno Leitao
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Breno Leitao @ 2025-11-13 16:46 UTC (permalink / raw)
  To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Saeed Mahameed, Mark Bloch,
	Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, Breno Leitao, kernel-team

This series migrates the mlx4 and mlx5 drivers to use the new
.get_rx_ring_count() callback introduced in commit 84eaf4359c36 ("net:
ethtool: add get_rx_ring_count callback to optimize RX ring queries").

Previously, these drivers handled ETHTOOL_GRXRINGS within the
.get_rxnfc() callback. With the dedicated .get_rx_ring_count() API, this
handling can be extracted and simplified.

For mlx5, this affects both the ethernet and IPoIB drivers. The
ETHTOOL_GRXRINGS handling was previously kept in .get_rxnfc() to support
"ethtool -x" when CONFIG_MLX5_EN_RXNFC=n, but this is no longer
necessary with the new dedicated callback.

Note: The mlx4 changes are compile-tested only, while mlx5 changes were
properly tested.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Breno Leitao (2):
      mlx4: extract GRXRINGS from .get_rxnfc
      mlx5: extract GRXRINGS from .get_rxnfc

 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c        | 11 ++++++++---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 18 ++++++++----------
 .../net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c    | 18 ++++++++----------
 3 files changed, 24 insertions(+), 23 deletions(-)
---
base-commit: 9f07af1d274223a4314b5e2e6d395a78166c24c5
change-id: 20251113-mlx_grxrings-195d95fe0e94

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc
  2025-11-13 16:46 [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
@ 2025-11-13 16:46 ` Breno Leitao
  2025-11-17 12:31   ` Tariq Toukan
  2025-11-13 16:46 ` [PATCH 2/2] mlx5: " Breno Leitao
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Breno Leitao @ 2025-11-13 16:46 UTC (permalink / raw)
  To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Saeed Mahameed, Mark Bloch,
	Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, Breno Leitao, kernel-team

Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.

Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().

This simplifies the RX ring count retrieval and aligns mlx4 with the new
ethtool API for querying RX ring parameters. This is compiled tested
only.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index a68cd3f0304c..ad6298456639 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -1727,6 +1727,13 @@ static int mlx4_en_get_num_flows(struct mlx4_en_priv *priv)
 
 }
 
+static u32 mlx4_en_get_rx_ring_count(struct net_device *dev)
+{
+	struct mlx4_en_priv *priv = netdev_priv(dev);
+
+	return priv->rx_ring_num;
+}
+
 static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 			     u32 *rule_locs)
 {
@@ -1743,9 +1750,6 @@ static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 		return -EINVAL;
 
 	switch (cmd->cmd) {
-	case ETHTOOL_GRXRINGS:
-		cmd->data = priv->rx_ring_num;
-		break;
 	case ETHTOOL_GRXCLSRLCNT:
 		cmd->rule_cnt = mlx4_en_get_num_flows(priv);
 		break;
@@ -2154,6 +2158,7 @@ const struct ethtool_ops mlx4_en_ethtool_ops = {
 	.set_ringparam = mlx4_en_set_ringparam,
 	.get_rxnfc = mlx4_en_get_rxnfc,
 	.set_rxnfc = mlx4_en_set_rxnfc,
+	.get_rx_ring_count = mlx4_en_get_rx_ring_count,
 	.get_rxfh_indir_size = mlx4_en_get_rxfh_indir_size,
 	.get_rxfh_key_size = mlx4_en_get_rxfh_key_size,
 	.get_rxfh = mlx4_en_get_rxfh,

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mlx5: extract GRXRINGS from .get_rxnfc
  2025-11-13 16:46 [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
  2025-11-13 16:46 ` [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc Breno Leitao
@ 2025-11-13 16:46 ` Breno Leitao
  2025-11-17 13:41   ` Tariq Toukan
  2025-11-13 16:48 ` [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
  2025-11-18  1:00 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 8+ messages in thread
From: Breno Leitao @ 2025-11-13 16:46 UTC (permalink / raw)
  To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Saeed Mahameed, Mark Bloch,
	Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, Breno Leitao, kernel-team

Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.

Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count() for both the mlx5 ethernet and IPoIB drivers.

The ETHTOOL_GRXRINGS handling was previously kept in .get_rxnfc() to
support "ethtool -x" when CONFIG_MLX5_EN_RXNFC=n. With the new
dedicated .get_rx_ring_count() callback, this is no longer necessary.

This simplifies the RX ring count retrieval and aligns mlx5 with the new
ethtool API for querying RX ring parameters.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 18 ++++++++----------
 .../net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c    | 18 ++++++++----------
 2 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 01b8f05a23db..939e274779b3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -2492,21 +2492,18 @@ static int mlx5e_set_rxfh_fields(struct net_device *dev,
 	return mlx5e_ethtool_set_rxfh_fields(priv, cmd, extack);
 }
 
+static u32 mlx5e_get_rx_ring_count(struct net_device *dev)
+{
+	struct mlx5e_priv *priv = netdev_priv(dev);
+
+	return priv->channels.params.num_channels;
+}
+
 static int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
 			   u32 *rule_locs)
 {
 	struct mlx5e_priv *priv = netdev_priv(dev);
 
-	/* ETHTOOL_GRXRINGS is needed by ethtool -x which is not part
-	 * of rxnfc. We keep this logic out of mlx5e_ethtool_get_rxnfc,
-	 * to avoid breaking "ethtool -x" when mlx5e_ethtool_get_rxnfc
-	 * is compiled out via CONFIG_MLX5_EN_RXNFC=n.
-	 */
-	if (info->cmd == ETHTOOL_GRXRINGS) {
-		info->data = priv->channels.params.num_channels;
-		return 0;
-	}
-
 	return mlx5e_ethtool_get_rxnfc(priv, info, rule_locs);
 }
 
@@ -2766,6 +2763,7 @@ const struct ethtool_ops mlx5e_ethtool_ops = {
 	.remove_rxfh_context	= mlx5e_remove_rxfh_context,
 	.get_rxnfc         = mlx5e_get_rxnfc,
 	.set_rxnfc         = mlx5e_set_rxnfc,
+	.get_rx_ring_count = mlx5e_get_rx_ring_count,
 	.get_tunable       = mlx5e_get_tunable,
 	.set_tunable       = mlx5e_set_tunable,
 	.get_pause_stats   = mlx5e_get_pause_stats,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
index 4b3430ac3905..3b2f54ca30a8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
@@ -266,21 +266,18 @@ static int mlx5i_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 	return mlx5e_ethtool_set_rxnfc(priv, cmd);
 }
 
+static u32 mlx5i_get_rx_ring_count(struct net_device *dev)
+{
+	struct mlx5e_priv *priv = mlx5i_epriv(dev);
+
+	return priv->channels.params.num_channels;
+}
+
 static int mlx5i_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
 			   u32 *rule_locs)
 {
 	struct mlx5e_priv *priv = mlx5i_epriv(dev);
 
-	/* ETHTOOL_GRXRINGS is needed by ethtool -x which is not part
-	 * of rxnfc. We keep this logic out of mlx5e_ethtool_get_rxnfc,
-	 * to avoid breaking "ethtool -x" when mlx5e_ethtool_get_rxnfc
-	 * is compiled out via CONFIG_MLX5_EN_RXNFC=n.
-	 */
-	if (info->cmd == ETHTOOL_GRXRINGS) {
-		info->data = priv->channels.params.num_channels;
-		return 0;
-	}
-
 	return mlx5e_ethtool_get_rxnfc(priv, info, rule_locs);
 }
 
@@ -304,6 +301,7 @@ const struct ethtool_ops mlx5i_ethtool_ops = {
 	.set_rxfh_fields    = mlx5i_set_rxfh_fields,
 	.get_rxnfc          = mlx5i_get_rxnfc,
 	.set_rxnfc          = mlx5i_set_rxnfc,
+	.get_rx_ring_count  = mlx5i_get_rx_ring_count,
 	.get_link_ksettings = mlx5i_get_link_ksettings,
 	.get_link           = ethtool_op_get_link,
 };

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API
  2025-11-13 16:46 [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
  2025-11-13 16:46 ` [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc Breno Leitao
  2025-11-13 16:46 ` [PATCH 2/2] mlx5: " Breno Leitao
@ 2025-11-13 16:48 ` Breno Leitao
  2025-11-14  0:35   ` Jakub Kicinski
  2025-11-18  1:00 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 8+ messages in thread
From: Breno Leitao @ 2025-11-13 16:48 UTC (permalink / raw)
  To: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Saeed Mahameed, Mark Bloch,
	Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, kernel-team

On Thu, Nov 13, 2025 at 08:46:02AM -0800, Breno Leitao wrote:
> This series migrates the mlx4 and mlx5 drivers to use the new
> .get_rx_ring_count() callback introduced in commit 84eaf4359c36 ("net:
> ethtool: add get_rx_ring_count callback to optimize RX ring queries").

This is "net-next" material. I will update and resend with the proper
"net-next" tag.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API
  2025-11-13 16:48 ` [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
@ 2025-11-14  0:35   ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2025-11-14  0:35 UTC (permalink / raw)
  To: Breno Leitao
  Cc: Tariq Toukan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Paolo Abeni, Saeed Mahameed, Mark Bloch, Leon Romanovsky, netdev,
	linux-rdma, linux-kernel, kernel-team

On Thu, 13 Nov 2025 08:48:20 -0800 Breno Leitao wrote:
> On Thu, Nov 13, 2025 at 08:46:02AM -0800, Breno Leitao wrote:
> > This series migrates the mlx4 and mlx5 drivers to use the new
> > .get_rx_ring_count() callback introduced in commit 84eaf4359c36 ("net:
> > ethtool: add get_rx_ring_count callback to optimize RX ring queries").  
> 
> This is "net-next" material. I will update and resend with the proper
> "net-next" tag.

No need to repost. net-next is the default

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc
  2025-11-13 16:46 ` [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc Breno Leitao
@ 2025-11-17 12:31   ` Tariq Toukan
  0 siblings, 0 replies; 8+ messages in thread
From: Tariq Toukan @ 2025-11-17 12:31 UTC (permalink / raw)
  To: Breno Leitao, Tariq Toukan, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Saeed Mahameed,
	Mark Bloch, Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, kernel-team



On 13/11/2025 18:46, Breno Leitao wrote:
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS callback,
> simplifying .get_rxnfc.
> 
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
> .get_rx_ring_count().
> 
> This simplifies the RX ring count retrieval and aligns mlx4 with the new
> ethtool API for querying RX ring parameters. This is compiled tested
> only.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>   drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index a68cd3f0304c..ad6298456639 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -1727,6 +1727,13 @@ static int mlx4_en_get_num_flows(struct mlx4_en_priv *priv)
>   
>   }
>   
> +static u32 mlx4_en_get_rx_ring_count(struct net_device *dev)
> +{
> +	struct mlx4_en_priv *priv = netdev_priv(dev);
> +
> +	return priv->rx_ring_num;
> +}
> +
>   static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
>   			     u32 *rule_locs)
>   {
> @@ -1743,9 +1750,6 @@ static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
>   		return -EINVAL;
>   
>   	switch (cmd->cmd) {
> -	case ETHTOOL_GRXRINGS:
> -		cmd->data = priv->rx_ring_num;
> -		break;
>   	case ETHTOOL_GRXCLSRLCNT:
>   		cmd->rule_cnt = mlx4_en_get_num_flows(priv);
>   		break;
> @@ -2154,6 +2158,7 @@ const struct ethtool_ops mlx4_en_ethtool_ops = {
>   	.set_ringparam = mlx4_en_set_ringparam,
>   	.get_rxnfc = mlx4_en_get_rxnfc,
>   	.set_rxnfc = mlx4_en_set_rxnfc,
> +	.get_rx_ring_count = mlx4_en_get_rx_ring_count,
>   	.get_rxfh_indir_size = mlx4_en_get_rxfh_indir_size,
>   	.get_rxfh_key_size = mlx4_en_get_rxfh_key_size,
>   	.get_rxfh = mlx4_en_get_rxfh,
> 

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mlx5: extract GRXRINGS from .get_rxnfc
  2025-11-13 16:46 ` [PATCH 2/2] mlx5: " Breno Leitao
@ 2025-11-17 13:41   ` Tariq Toukan
  0 siblings, 0 replies; 8+ messages in thread
From: Tariq Toukan @ 2025-11-17 13:41 UTC (permalink / raw)
  To: Breno Leitao, Tariq Toukan, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Saeed Mahameed,
	Mark Bloch, Leon Romanovsky
  Cc: netdev, linux-rdma, linux-kernel, kernel-team



On 13/11/2025 18:46, Breno Leitao wrote:
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS callback,
> simplifying .get_rxnfc.
> 
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
> .get_rx_ring_count() for both the mlx5 ethernet and IPoIB drivers.
> 
> The ETHTOOL_GRXRINGS handling was previously kept in .get_rxnfc() to
> support "ethtool -x" when CONFIG_MLX5_EN_RXNFC=n. With the new
> dedicated .get_rx_ring_count() callback, this is no longer necessary.
> 
> This simplifies the RX ring count retrieval and aligns mlx5 with the new
> ethtool API for querying RX ring parameters.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 18 ++++++++----------
>   .../net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c    | 18 ++++++++----------
>   2 files changed, 16 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index 01b8f05a23db..939e274779b3 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -2492,21 +2492,18 @@ static int mlx5e_set_rxfh_fields(struct net_device *dev,
>   	return mlx5e_ethtool_set_rxfh_fields(priv, cmd, extack);
>   }
>   
> +static u32 mlx5e_get_rx_ring_count(struct net_device *dev)
> +{
> +	struct mlx5e_priv *priv = netdev_priv(dev);
> +
> +	return priv->channels.params.num_channels;
> +}
> +
>   static int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
>   			   u32 *rule_locs)
>   {
>   	struct mlx5e_priv *priv = netdev_priv(dev);
>   
> -	/* ETHTOOL_GRXRINGS is needed by ethtool -x which is not part
> -	 * of rxnfc. We keep this logic out of mlx5e_ethtool_get_rxnfc,
> -	 * to avoid breaking "ethtool -x" when mlx5e_ethtool_get_rxnfc
> -	 * is compiled out via CONFIG_MLX5_EN_RXNFC=n.
> -	 */
> -	if (info->cmd == ETHTOOL_GRXRINGS) {
> -		info->data = priv->channels.params.num_channels;
> -		return 0;
> -	}
> -
>   	return mlx5e_ethtool_get_rxnfc(priv, info, rule_locs);
>   }
>   
> @@ -2766,6 +2763,7 @@ const struct ethtool_ops mlx5e_ethtool_ops = {
>   	.remove_rxfh_context	= mlx5e_remove_rxfh_context,
>   	.get_rxnfc         = mlx5e_get_rxnfc,
>   	.set_rxnfc         = mlx5e_set_rxnfc,
> +	.get_rx_ring_count = mlx5e_get_rx_ring_count,
>   	.get_tunable       = mlx5e_get_tunable,
>   	.set_tunable       = mlx5e_set_tunable,
>   	.get_pause_stats   = mlx5e_get_pause_stats,
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
> index 4b3430ac3905..3b2f54ca30a8 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
> @@ -266,21 +266,18 @@ static int mlx5i_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
>   	return mlx5e_ethtool_set_rxnfc(priv, cmd);
>   }
>   
> +static u32 mlx5i_get_rx_ring_count(struct net_device *dev)
> +{
> +	struct mlx5e_priv *priv = mlx5i_epriv(dev);
> +
> +	return priv->channels.params.num_channels;
> +}
> +
>   static int mlx5i_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
>   			   u32 *rule_locs)
>   {
>   	struct mlx5e_priv *priv = mlx5i_epriv(dev);
>   
> -	/* ETHTOOL_GRXRINGS is needed by ethtool -x which is not part
> -	 * of rxnfc. We keep this logic out of mlx5e_ethtool_get_rxnfc,
> -	 * to avoid breaking "ethtool -x" when mlx5e_ethtool_get_rxnfc
> -	 * is compiled out via CONFIG_MLX5_EN_RXNFC=n.
> -	 */
> -	if (info->cmd == ETHTOOL_GRXRINGS) {
> -		info->data = priv->channels.params.num_channels;
> -		return 0;
> -	}
> -
>   	return mlx5e_ethtool_get_rxnfc(priv, info, rule_locs);
>   }
>   
> @@ -304,6 +301,7 @@ const struct ethtool_ops mlx5i_ethtool_ops = {
>   	.set_rxfh_fields    = mlx5i_set_rxfh_fields,
>   	.get_rxnfc          = mlx5i_get_rxnfc,
>   	.set_rxnfc          = mlx5i_set_rxnfc,
> +	.get_rx_ring_count  = mlx5i_get_rx_ring_count,
>   	.get_link_ksettings = mlx5i_get_link_ksettings,
>   	.get_link           = ethtool_op_get_link,
>   };
> 

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API
  2025-11-13 16:46 [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
                   ` (2 preceding siblings ...)
  2025-11-13 16:48 ` [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
@ 2025-11-18  1:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-18  1:00 UTC (permalink / raw)
  To: Breno Leitao
  Cc: tariqt, andrew+netdev, davem, edumazet, kuba, pabeni, saeedm,
	mbloch, leon, netdev, linux-rdma, linux-kernel, kernel-team

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 13 Nov 2025 08:46:02 -0800 you wrote:
> This series migrates the mlx4 and mlx5 drivers to use the new
> .get_rx_ring_count() callback introduced in commit 84eaf4359c36 ("net:
> ethtool: add get_rx_ring_count callback to optimize RX ring queries").
> 
> Previously, these drivers handled ETHTOOL_GRXRINGS within the
> .get_rxnfc() callback. With the dedicated .get_rx_ring_count() API, this
> handling can be extracted and simplified.
> 
> [...]

Here is the summary with links:
  - [1/2] mlx4: extract GRXRINGS from .get_rxnfc
    https://git.kernel.org/netdev/net-next/c/467c3f008d0c
  - [2/2] mlx5: extract GRXRINGS from .get_rxnfc
    https://git.kernel.org/netdev/net-next/c/945499665f63

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-18  1:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 16:46 [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
2025-11-13 16:46 ` [PATCH 1/2] mlx4: extract GRXRINGS from .get_rxnfc Breno Leitao
2025-11-17 12:31   ` Tariq Toukan
2025-11-13 16:46 ` [PATCH 2/2] mlx5: " Breno Leitao
2025-11-17 13:41   ` Tariq Toukan
2025-11-13 16:48 ` [PATCH 0/2] net: mlx: migrate to new get_rx_ring_count ethtool API Breno Leitao
2025-11-14  0:35   ` Jakub Kicinski
2025-11-18  1:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).