diff options
author | Maxim Mikityanskiy <maximmi@nvidia.com> | 2022-02-09 15:32:35 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-03-18 13:51:12 -0700 |
commit | d51f4a4cca6f629927b1871af0c6f5ce7a9022e9 (patch) | |
tree | a939c726da8b1f80a56077cf7a13d30f1fd63fe5 /drivers/net/ethernet/mellanox/mlx5/core/en/params.c | |
parent | 9cb9482ef10e7e524f73878cb20de138be7e1a1f (diff) | |
download | linux-stable-d51f4a4cca6f629927b1871af0c6f5ce7a9022e9.tar.gz linux-stable-d51f4a4cca6f629927b1871af0c6f5ce7a9022e9.tar.bz2 linux-stable-d51f4a4cca6f629927b1871af0c6f5ce7a9022e9.zip |
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: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/params.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c index 822fbb9b80e7..9646867872c1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c @@ -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, params->xdp_prog); - if (byte_count > max_mtu) { + if (byte_count > max_mtu || params->xdp_prog) { frag_size_max = PAGE_SIZE; first_frag_size_max = SKB_WITH_OVERHEAD(frag_size_max - headroom); |