]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
eth: mlx5: allow disabling queues when RSS contexts exist
authorJakub Kicinski <kuba@kernel.org>
Sat, 10 Aug 2024 05:37:19 +0000 (22:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Aug 2024 13:16:24 +0000 (14:16 +0100)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 56bdb4d07b7adf1d8b8e70cc63b7d946b5df5733..8af509397f6302ec185a40e114372d393940d904 100644 (file)
@@ -433,7 +433,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;
 
@@ -487,17 +486,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.
         */