Commit d51f4a4c authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by Saeed Mahameed

net/mlx5e: Use page-sized fragments with XDP multi buffer

The implementation of XDP in mlx5e assumes that the frame size is equal
to the page size. Force this limitation in the non-linear mode for XDP
multi buffer.
Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 9cb9482e
...@@ -444,7 +444,7 @@ static int mlx5e_build_rq_frags_info(struct mlx5_core_dev *mdev, ...@@ -444,7 +444,7 @@ static int mlx5e_build_rq_frags_info(struct mlx5_core_dev *mdev,
max_mtu = mlx5e_max_nonlinear_mtu(first_frag_size_max, frag_size_max, max_mtu = mlx5e_max_nonlinear_mtu(first_frag_size_max, frag_size_max,
params->xdp_prog); params->xdp_prog);
if (byte_count > max_mtu) { if (byte_count > max_mtu || params->xdp_prog) {
frag_size_max = PAGE_SIZE; frag_size_max = PAGE_SIZE;
first_frag_size_max = SKB_WITH_OVERHEAD(frag_size_max - headroom); first_frag_size_max = SKB_WITH_OVERHEAD(frag_size_max - headroom);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment