netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	michael.chan@broadcom.com, shuah@kernel.org,
	ecree.xilinx@gmail.com, przemyslaw.kitszel@intel.com,
	ahmed.zaki@intel.com, andrew@lunn.ch, willemb@google.com,
	pavan.chebbi@broadcom.com, petrm@nvidia.com, gal@nvidia.com,
	jdamato@fastly.com, donald.hunter@gmail.com,
	Jakub Kicinski <kuba@kernel.org>,
	saeedm@nvidia.com, tariqt@nvidia.com, leon@kernel.org,
	linux-rdma@vger.kernel.org
Subject: [PATCH net-next v4 03/12] eth: mlx5: allow disabling queues when RSS contexts exist
Date: Thu,  8 Aug 2024 20:18:18 -0700	[thread overview]
Message-ID: <20240809031827.2373341-4-kuba@kernel.org> (raw)
In-Reply-To: <20240809031827.2373341-1-kuba@kernel.org>

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: Gal Pressman <gal@nvidia.com>
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.46.0


  parent reply	other threads:[~2024-08-09  3:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  3:18 [PATCH net-next v4 00/12] ethtool: rss: driver tweaks and netlink context dumps Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 01/12] selftests: drv-net: rss_ctx: add identifier to traffic comments Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 02/12] eth: mvpp2: implement new RSS context API Jakub Kicinski
2024-08-09 14:56   ` Simon Horman
2024-08-09 18:05   ` kernel test robot
2024-08-09 19:47   ` kernel test robot
2024-08-09  3:18 ` Jakub Kicinski [this message]
2024-08-09  3:18 ` [PATCH net-next v4 04/12] ethtool: make ethtool_ops::cap_rss_ctx_supported optional Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 05/12] eth: remove .cap_rss_ctx_supported from updated drivers Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 06/12] ethtool: rss: don't report key if device doesn't support it Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 07/12] ethtool: rss: move the device op invocation out of rss_prepare_data() Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 08/12] ethtool: rss: report info about additional contexts from XArray Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 09/12] ethtool: rss: support dumping RSS contexts Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 10/12] ethtool: rss: support skipping contexts during dump Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 11/12] netlink: specs: decode indirection table as u32 array Jakub Kicinski
2024-08-09  3:18 ` [PATCH net-next v4 12/12] selftests: drv-net: rss_ctx: test dumping RSS contexts Jakub Kicinski

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=20240809031827.2373341-4-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=ahmed.zaki@intel.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=jdamato@fastly.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=petrm@nvidia.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=saeedm@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=tariqt@nvidia.com \
    --cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).