diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-06-26 17:35:35 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-06-27 22:53:28 +0200 |
commit | a011b49f4ed7813777a15da12a426ab939c58f14 (patch) | |
tree | 1d8529bdc872a9bae18caa591604f7c11b82752b /drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | |
parent | 84a0a2310d6de247335574649726cb000c7c0074 (diff) | |
download | linux-stable-a011b49f4ed7813777a15da12a426ab939c58f14.tar.gz linux-stable-a011b49f4ed7813777a15da12a426ab939c58f14.tar.bz2 linux-stable-a011b49f4ed7813777a15da12a426ab939c58f14.zip |
net/mlx5e: Consider XSK in XDP MTU limit calculation
Use the existing mlx5e_get_linear_rq_headroom function to calculate the
headroom for mlx5e_xdp_max_mtu. This function takes the XSK headroom
into consideration, which will be used in the following patches.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h index 86db5ad49a42..9200cb9f499b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h @@ -39,7 +39,8 @@ (sizeof(struct mlx5e_tx_wqe) / MLX5_SEND_WQE_DS) #define MLX5E_XDP_TX_DS_COUNT (MLX5E_XDP_TX_EMPTY_DS_COUNT + 1 /* SG DS */) -int mlx5e_xdp_max_mtu(struct mlx5e_params *params); +struct mlx5e_xsk_param; +int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk); bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, void *va, u16 *rx_headroom, u32 *len); bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq); |