diff options
author | Tariq Toukan <tariqt@nvidia.com> | 2021-03-09 17:37:42 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-04-16 21:48:02 +0300 |
commit | b6b3ad2175c852557c06fb52ed533e35a143fb72 (patch) | |
tree | b78c48dc1c80e6684f8a9a13f2e5a35e33f55307 /drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h | |
parent | 8668587a33b99492b73fd4dbec432f793853376d (diff) | |
download | linux-b6b3ad2175c852557c06fb52ed533e35a143fb72.tar.xz |
net/mlx5e: TX, Inline TLS skb check
When TLS is supported and enabled, every transmitted packet is tested
to identify if TLS offload is required.
Take the early-return condition into an inline function, to save
the overhead of a function call for non-TLS packets.
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 cc2851ecd512..043c86c52798 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 @@ -124,8 +124,9 @@ static inline bool mlx5e_accel_tx_begin(struct net_device *dev, #ifdef CONFIG_MLX5_EN_TLS /* May send SKBs and WQEs. */ - if (unlikely(!mlx5e_tls_handle_tx_skb(dev, sq, skb, &state->tls))) - return false; + if (mlx5e_tls_skb_offloaded(skb)) + if (unlikely(!mlx5e_tls_handle_tx_skb(dev, sq, skb, &state->tls))) + return false; #endif #ifdef CONFIG_MLX5_EN_IPSEC |