Skip to content

Commit 72f6f2f

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: TX, Inline function mlx5e_tls_handle_tx_wqe()
When TLS is supported, WQE ctrl segment of every transmitted packet is updated with the (possibly empty, for non-TLS packets) TISN field. Take this one-liner function into the header file and inline it, to save the overhead of a function call per packet. While here, remove unused function parameter. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent b6b3ad2 commit 72f6f2f

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

‎drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static inline void mlx5e_accel_tx_finish(struct mlx5e_txqsq *sq,
185185
struct mlx5_wqe_inline_seg *inlseg)
186186
{
187187
#ifdef CONFIG_MLX5_EN_TLS
188-
mlx5e_tls_handle_tx_wqe(sq, &wqe->ctrl, &state->tls);
188+
mlx5e_tls_handle_tx_wqe(&wqe->ctrl, &state->tls);
189189
#endif
190190

191191
#ifdef CONFIG_MLX5_EN_IPSEC

‎drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,6 @@ bool mlx5e_tls_handle_tx_skb(struct net_device *netdev, struct mlx5e_txqsq *sq,
298298
return false;
299299
}
300300

301-
void mlx5e_tls_handle_tx_wqe(struct mlx5e_txqsq *sq, struct mlx5_wqe_ctrl_seg *cseg,
302-
struct mlx5e_accel_tx_tls_state *state)
303-
{
304-
cseg->tis_tir_num = cpu_to_be32(state->tls_tisn << 8);
305-
}
306-
307301
static int tls_update_resync_sn(struct net_device *netdev,
308302
struct sk_buff *skb,
309303
struct mlx5e_tls_metadata *mdata)

‎drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.h‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ static inline bool mlx5e_tls_skb_offloaded(struct sk_buff *skb)
5353
return skb->sk && tls_is_sk_tx_device_offloaded(skb->sk);
5454
}
5555

56-
void mlx5e_tls_handle_tx_wqe(struct mlx5e_txqsq *sq, struct mlx5_wqe_ctrl_seg *cseg,
57-
struct mlx5e_accel_tx_tls_state *state);
56+
static inline void
57+
mlx5e_tls_handle_tx_wqe(struct mlx5_wqe_ctrl_seg *cseg,
58+
struct mlx5e_accel_tx_tls_state *state)
59+
{
60+
cseg->tis_tir_num = cpu_to_be32(state->tls_tisn << 8);
61+
}
5862

5963
void mlx5e_tls_handle_rx_skb_metadata(struct mlx5e_rq *rq, struct sk_buff *skb,
6064
u32 *cqe_bcnt);

0 commit comments

Comments
 (0)