diff options
author | 2022-02-14 19:59:19 +0200 | |
---|---|---|
committer | 2022-03-17 11:51:54 -0700 | |
commit | 7c3b4df594b6c51c1fc95e6fd9f949bdddff34b5 (patch) | |
tree | 8d686e233ec76df85f8ca4113401b36a536b0fc6 /net/unix/af_unix.c | |
parent | selftests: net: fix array_size.cocci warning (diff) | |
download | wireguard-linux-7c3b4df594b6c51c1fc95e6fd9f949bdddff34b5.tar.xz wireguard-linux-7c3b4df594b6c51c1fc95e6fd9f949bdddff34b5.zip |
net/mlx5e: Validate MTU when building non-linear legacy RQ fragments info
mlx5e_build_rq_frags_info() assumes that MTU is not bigger than
PAGE_SIZE * MLX5E_MAX_RX_FRAGS, which is 16K for 4K pages. Currently,
the firmware limits MTU to 10K, so the assumption doesn't lead to a bug.
This commits adds an additional driver check for reliability, since the
firmware boundary might be changed.
The calculation is taken to a separate function with a comment
explaining it. It's a preparation for the following patches that
introcuce XDP multi buffer support.
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 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions