net/mlx5e: move XDP_REDIRECT sq to dynamic allocation
authorWilliam Tu <witu@nvidia.com>
Thu, 31 Oct 2024 12:58:55 +0000 (14:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 3 Nov 2024 23:37:15 +0000 (15:37 -0800)
commitbb135e40129ddd254cfb474b58981313be79a631
treeb28dae0f8a0f28f703a8185b69e27836f760a54d
parenta2740138ec659b53f3a7670b34819737af596c59
net/mlx5e: move XDP_REDIRECT sq to dynamic allocation

Dynamically allocating xdpsq, used by egress side XDP_REDIRECT.
mlx5 has multiple XDP sqs. Under struct mlx5e_channel:
1. rx_xdpsq: used for XDP_TX, an XDP prog handles the rx packet and
transmits using the same queue as rx.
2. xdpsq: used by egress side XDP_REDIRECT. This is for another interface
to redirect packet to the mlx5 interface, using ndo_xdp_xmit .
3. xsksq: used by XSK. XSK has its own dedicated channel, and it also
has resources of 1 and 2.

The patch changes only the 2. xdpsq.

Signed-off-by: William Tu <witu@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241031125856.530927-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c