From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Tariq Toukan <tariqt@nvidia.com>,
netdev@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 01/14] net/mlx5e: Remove non-essential TLS SQ state bit
Date: Fri, 16 Apr 2021 11:54:17 -0700 [thread overview]
Message-ID: <20210416185430.62584-2-saeed@kernel.org> (raw)
In-Reply-To: <20210416185430.62584-1-saeed@kernel.org>
From: Tariq Toukan <tariqt@nvidia.com>
Maintaining an SQ state bit to indicate TLS support
has no real need, a simple and fast test [1] for the SKB is
almost equally good.
[1] !skb->sk || !tls_is_sk_tx_device_offloaded(skb->sk)
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 -
.../net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h | 8 +++-----
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 --
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index e1c51eabe8fe..cb4e7aaa4f8a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -325,7 +325,6 @@ enum {
MLX5E_SQ_STATE_RECOVERING,
MLX5E_SQ_STATE_IPSEC,
MLX5E_SQ_STATE_AM,
- MLX5E_SQ_STATE_TLS,
MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE,
MLX5E_SQ_STATE_PENDING_XSK_TX,
};
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
index cc0efac7b812..cc2851ecd512 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
@@ -123,11 +123,9 @@ static inline bool mlx5e_accel_tx_begin(struct net_device *dev,
mlx5e_udp_gso_handle_tx_skb(skb);
#ifdef CONFIG_MLX5_EN_TLS
- if (test_bit(MLX5E_SQ_STATE_TLS, &sq->state)) {
- /* May send SKBs and WQEs. */
- if (unlikely(!mlx5e_tls_handle_tx_skb(dev, sq, skb, &state->tls)))
- return false;
- }
+ /* May send SKBs and WQEs. */
+ if (unlikely(!mlx5e_tls_handle_tx_skb(dev, sq, skb, &state->tls)))
+ return false;
#endif
#ifdef CONFIG_MLX5_EN_IPSEC
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 6847e7b909a5..64d6c0fd92bf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1134,8 +1134,6 @@ static int mlx5e_alloc_txqsq(struct mlx5e_channel *c,
set_bit(MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE, &sq->state);
if (MLX5_IPSEC_DEV(c->priv->mdev))
set_bit(MLX5E_SQ_STATE_IPSEC, &sq->state);
- if (mlx5_accel_is_tls_device(c->priv->mdev))
- set_bit(MLX5E_SQ_STATE_TLS, &sq->state);
if (param->is_mpw)
set_bit(MLX5E_SQ_STATE_MPWQE, &sq->state);
sq->stop_room = param->stop_room;
--
2.30.2
next prev parent reply other threads:[~2021-04-16 18:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 18:54 [pull request][net-next 00/14] mlx5 updates 2021-04-16 Saeed Mahameed
2021-04-16 18:54 ` Saeed Mahameed [this message]
2021-04-17 0:00 ` [net-next 01/14] net/mlx5e: Remove non-essential TLS SQ state bit patchwork-bot+netdevbpf
2021-04-16 18:54 ` [net-next 02/14] net/mlx5e: Cleanup unused function parameter Saeed Mahameed
2021-04-16 18:54 ` [net-next 03/14] net/mlx5e: TX, Inline TLS skb check Saeed Mahameed
2021-04-16 18:54 ` [net-next 04/14] net/mlx5e: TX, Inline function mlx5e_tls_handle_tx_wqe() Saeed Mahameed
2021-04-16 18:54 ` [net-next 05/14] net/mlx5e: kTLS, Add resiliency to RX resync failures Saeed Mahameed
2021-04-16 18:54 ` [net-next 06/14] net/mlx5e: Allow mlx5e_safe_switch_channels to work with channels closed Saeed Mahameed
2021-04-16 18:54 ` [net-next 07/14] net/mlx5e: Use mlx5e_safe_switch_channels when channels are closed Saeed Mahameed
2021-04-16 18:54 ` [net-next 08/14] net/mlx5e: Refactor on-the-fly configuration changes Saeed Mahameed
2021-04-16 18:54 ` [net-next 09/14] net/mlx5e: Cleanup safe switch channels API by passing params Saeed Mahameed
2021-04-16 18:54 ` [net-next 10/14] net/mlx5: Allocate FC bulk structs with kvzalloc() instead of kzalloc() Saeed Mahameed
2021-04-16 18:54 ` [net-next 11/14] net/mlx5: Add register layout to support extended link state Saeed Mahameed
2021-04-16 18:54 ` [net-next 12/14] net/mlx5e: Add ethtool " Saeed Mahameed
2021-04-16 18:54 ` [net-next 13/14] net/mlx5: Add helper to initialize 1PPS Saeed Mahameed
2021-04-16 18:54 ` [net-next 14/14] net/mlx5: Enhance diagnostics info for TX/RX reporters 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=20210416185430.62584-2-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--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).