Skip to content

Commit c090451

Browse files
nvmmaxSaeed Mahameed
authored andcommitted
net/mlx5e: Remove assignment of inline_hdr.sz on XDP TX
When MPWQE is disabled, mlx5e_open_xdpsq prefills the common fields of WQEs in the XDP SQ to save time when sending packets. One of such fields is eseg->inline_hdr.sz, which can be either 0 or MLX5E_XDP_MIN_INLINE, depending on the inline mode of the SQ. The inline mode can't change during the lifetime of the SQ, so setting this field again in mlx5e_xmit_xdp_frame is redundant. Moreover, the xmit function only sets it to MLX5E_XDP_MIN_INLINE, but not to 0 in the other case. This commit removes the redundant assignment in mlx5e_xmit_xdp_frame. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 49529a1 commit c090451

File tree

1 file changed

+0
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+0
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ mlx5e_xmit_xdp_frame(struct mlx5e_xdpsq *sq, struct mlx5e_xmit_data *xdptxd,
343343
/* copy the inline part if required */
344344
if (sq->min_inline_mode != MLX5_INLINE_MODE_NONE) {
345345
memcpy(eseg->inline_hdr.start, xdptxd->data, sizeof(eseg->inline_hdr.start));
346-
eseg->inline_hdr.sz = cpu_to_be16(MLX5E_XDP_MIN_INLINE);
347346
memcpy(dseg, xdptxd->data + sizeof(eseg->inline_hdr.start),
348347
MLX5E_XDP_MIN_INLINE - sizeof(eseg->inline_hdr.start));
349348
dma_len -= MLX5E_XDP_MIN_INLINE;

0 commit comments

Comments
 (0)