From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
Maxim Mikityanskiy <maximmi@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 03/16] net/mlx5: Take TIR destruction out of the TIR list lock
Date: Mon, 26 Jul 2021 09:55:31 -0700 [thread overview]
Message-ID: <20210726165544.389143-4-saeed@kernel.org> (raw)
In-Reply-To: <20210726165544.389143-1-saeed@kernel.org>
From: Maxim Mikityanskiy <maximmi@nvidia.com>
res->td.list_lock protects the list of TIRs. There is no point to call
mlx5_core_destroy_tir() and invoke a firmware command under this lock.
This commit moves this call outside of the lock and puts it after
deleting the TIR from the list to ensure that TIRs are always alive
while in the list.
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
index 8c166ee56d8b..f3bdd063051a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
@@ -58,9 +58,10 @@ void mlx5e_destroy_tir(struct mlx5_core_dev *mdev,
struct mlx5e_hw_objs *res = &mdev->mlx5e_res.hw_objs;
mutex_lock(&res->td.list_lock);
- mlx5_core_destroy_tir(mdev, tir->tirn);
list_del(&tir->list);
mutex_unlock(&res->td.list_lock);
+
+ mlx5_core_destroy_tir(mdev, tir->tirn);
}
void mlx5e_mkey_set_relaxed_ordering(struct mlx5_core_dev *mdev, void *mkc)
--
2.31.1
next prev parent reply other threads:[~2021-07-26 16:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 16:55 [pull request][net-next 00/16] mlx5 updates 2021-07-24 Saeed Mahameed
2021-07-26 16:55 ` [net-next 01/16] net/mlx5e: Prohibit inner indir TIRs in IPoIB Saeed Mahameed
2021-07-26 21:40 ` patchwork-bot+netdevbpf
2021-07-26 16:55 ` [net-next 02/16] net/mlx5e: Block LRO if firmware asks for tunneled LRO Saeed Mahameed
2021-07-26 16:55 ` Saeed Mahameed [this message]
2021-07-26 16:55 ` [net-next 04/16] net/mlx5e: Check if inner FT is supported outside of create/destroy functions Saeed Mahameed
2021-07-26 16:55 ` [net-next 05/16] net/mlx5e: Convert RQT to a dedicated object Saeed Mahameed
2021-07-26 16:55 ` [net-next 06/16] net/mlx5e: Move mlx5e_build_rss_params() call to init_rx Saeed Mahameed
2021-07-26 16:55 ` [net-next 07/16] net/mlx5e: Move RX resources to a separate struct Saeed Mahameed
2021-07-26 16:55 ` [net-next 08/16] net/mlx5e: Take RQT out of TIR and group RX resources Saeed Mahameed
2021-07-26 16:55 ` [net-next 09/16] net/mlx5e: Use mlx5e_rqt_get_rqtn to access RQT hardware id Saeed Mahameed
2021-07-26 16:55 ` [net-next 10/16] net/mlx5e: Remove mlx5e_priv usage from mlx5e_build_*tir_ctx*() Saeed Mahameed
2021-07-26 16:55 ` [net-next 11/16] net/mlx5e: Remove lro_param from mlx5e_build_indir_tir_ctx_common() Saeed Mahameed
2021-07-26 16:55 ` [net-next 12/16] net/mlx5e: Remove mdev " Saeed Mahameed
2021-07-26 16:55 ` [net-next 13/16] net/mlx5e: Create struct mlx5e_rss_params_hash Saeed Mahameed
2021-07-26 16:55 ` [net-next 14/16] net/mlx5e: Convert TIR to a dedicated object Saeed Mahameed
2021-07-26 16:55 ` [net-next 15/16] net/mlx5e: Move management of indir traffic types to rx_res Saeed Mahameed
2021-07-26 16:55 ` [net-next 16/16] net/mlx5e: Use the new TIR API for kTLS Saeed Mahameed
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=20210726165544.389143-4-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.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).