diff options
author | Tariq Toukan <tariqt@nvidia.com> | 2023-04-17 15:18:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-19 08:59:25 +0100 |
commit | aebc62d336fed235e35d8522a004866c78dfa5c4 (patch) | |
tree | 3774f206e31084b7ad776a0f35cfcd473be58852 /drivers/net/ethernet/mellanox/mlx5/core/en.h | |
parent | 14cac662235ea097b6ff97f558ce5066292806b9 (diff) | |
download | linux-stable-aebc62d336fed235e35d8522a004866c78dfa5c4.tar.gz linux-stable-aebc62d336fed235e35d8522a004866c78dfa5c4.tar.bz2 linux-stable-aebc62d336fed235e35d8522a004866c78dfa5c4.zip |
net/mlx5e: Move XDP struct and enum to XDP header
Move struct mlx5e_xdp_info and enum mlx5e_xdp_xmit_mode from the generic
en.h to the XDP header, where they belong.
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index ba615b74bb8e..3f5463d42a1e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -475,41 +475,6 @@ struct mlx5e_txqsq { cqe_ts_to_ns ptp_cyc2time; } ____cacheline_aligned_in_smp; -/* XDP packets can be transmitted in different ways. On completion, we need to - * distinguish between them to clean up things in a proper way. - */ -enum mlx5e_xdp_xmit_mode { - /* An xdp_frame was transmitted due to either XDP_REDIRECT from another - * device or XDP_TX from an XSK RQ. The frame has to be unmapped and - * returned. - */ - MLX5E_XDP_XMIT_MODE_FRAME, - - /* The xdp_frame was created in place as a result of XDP_TX from a - * regular RQ. No DMA remapping happened, and the page belongs to us. - */ - MLX5E_XDP_XMIT_MODE_PAGE, - - /* No xdp_frame was created at all, the transmit happened from a UMEM - * page. The UMEM Completion Ring producer pointer has to be increased. - */ - MLX5E_XDP_XMIT_MODE_XSK, -}; - -struct mlx5e_xdp_info { - enum mlx5e_xdp_xmit_mode mode; - union { - struct { - struct xdp_frame *xdpf; - dma_addr_t dma_addr; - } frame; - struct { - struct mlx5e_rq *rq; - struct page *page; - } page; - }; -}; - struct mlx5e_xmit_data { dma_addr_t dma_addr; void *data; |