net/mlx5e: Reduce contention in IPsec workqueue
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 30 Mar 2023 08:02:29 +0000 (11:02 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 6 Apr 2023 07:09:39 +0000 (10:09 +0300)
IPsec workqueue shouldn't be declared as ordered queue with one work
per-CPU, and can be safely changed to be unordered with default number
of works per-CPU.

Link: https://lore.kernel.org/r/5dc224a4decd09c14f645d38173e1a1710802cd8.1680162300.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

index b8058f8..fa66f4f 100644 (file)
@@ -561,8 +561,8 @@ void mlx5e_ipsec_init(struct mlx5e_priv *priv)
 
        xa_init_flags(&ipsec->sadb, XA_FLAGS_ALLOC);
        ipsec->mdev = priv->mdev;
-       ipsec->wq = alloc_ordered_workqueue("mlx5e_ipsec: %s", 0,
-                                           priv->netdev->name);
+       ipsec->wq = alloc_workqueue("mlx5e_ipsec: %s", WQ_UNBOUND, 0,
+                                   priv->netdev->name);
        if (!ipsec->wq)
                goto err_wq;