Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH net-next v2 03/12] eth: mlx5: allow disabling queues when RSS contexts exist
       [not found] <20240803042624.970352-1-kuba@kernel.org>
@ 2024-08-03  4:26 ` Jakub Kicinski
  2024-08-04  6:36   ` Gal Pressman
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2024-08-03  4:26 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, dxu, ecree.xilinx, przemyslaw.kitszel,
	donald.hunter, gal.pressman, tariqt, willemdebruijn.kernel,
	jdamato, Jakub Kicinski, saeedm, leon, linux-rdma

Since commit 24ac7e544081 ("ethtool: use the rss context XArray
in ring deactivation safety-check") core will prevent queues from
being disabled while being used by additional RSS contexts.
The safety check is no longer necessary, and core will do a more
accurate job of only rejecting changes which can actually break
things.

Reviewed-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: saeedm@nvidia.com
CC: tariqt@nvidia.com
CC: leon@kernel.org
CC: linux-rdma@vger.kernel.org
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 36845872ae94..0b941482db30 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -445,7 +445,6 @@ int mlx5e_ethtool_set_channels(struct mlx5e_priv *priv,
 	unsigned int count = ch->combined_count;
 	struct mlx5e_params new_params;
 	bool arfs_enabled;
-	int rss_cnt;
 	bool opened;
 	int err = 0;
 
@@ -499,17 +498,6 @@ int mlx5e_ethtool_set_channels(struct mlx5e_priv *priv,
 		goto out;
 	}
 
-	/* Don't allow changing the number of channels if non-default RSS contexts exist,
-	 * the kernel doesn't protect against set_channels operations that break them.
-	 */
-	rss_cnt = mlx5e_rx_res_rss_cnt(priv->rx_res) - 1;
-	if (rss_cnt) {
-		err = -EINVAL;
-		netdev_err(priv->netdev, "%s: Non-default RSS contexts exist (%d), cannot change the number of channels\n",
-			   __func__, rss_cnt);
-		goto out;
-	}
-
 	/* Don't allow changing the number of channels if MQPRIO mode channel offload is active,
 	 * because it defines a partition over the channels queues.
 	 */
-- 
2.45.2


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

* Re: [PATCH net-next v2 03/12] eth: mlx5: allow disabling queues when RSS contexts exist
  2024-08-03  4:26 ` [PATCH net-next v2 03/12] eth: mlx5: allow disabling queues when RSS contexts exist Jakub Kicinski
@ 2024-08-04  6:36   ` Gal Pressman
  0 siblings, 0 replies; 2+ messages in thread
From: Gal Pressman @ 2024-08-04  6:36 UTC (permalink / raw)
  To: Jakub Kicinski, davem
  Cc: netdev, edumazet, pabeni, dxu, ecree.xilinx, przemyslaw.kitszel,
	donald.hunter, tariqt, willemdebruijn.kernel, jdamato, saeedm,
	leon, linux-rdma

On 03/08/2024 7:26, Jakub Kicinski wrote:
> Since commit 24ac7e544081 ("ethtool: use the rss context XArray
> in ring deactivation safety-check") core will prevent queues from
> being disabled while being used by additional RSS contexts.
> The safety check is no longer necessary, and core will do a more
> accurate job of only rejecting changes which can actually break
> things.

Very cool, thanks!
Reviewed-by: Gal Pressman <gal@nvidia.com>

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

end of thread, other threads:[~2024-08-04  6:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240803042624.970352-1-kuba@kernel.org>
2024-08-03  4:26 ` [PATCH net-next v2 03/12] eth: mlx5: allow disabling queues when RSS contexts exist Jakub Kicinski
2024-08-04  6:36   ` Gal Pressman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox