]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: xsk: Account for XSK RQ UMRs when calculating ICOSQ size
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Mon, 30 May 2022 18:06:03 +0000 (21:06 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 28 Jul 2022 20:44:26 +0000 (13:44 -0700)
commitd54ff864198022800fcbe8622582139bf156bed4
tree971f0ca00b782ba7adc2196951b416b3453f6723
parent2897b5550965e556d3abdc5e64dbe58f25dc7f02
net/mlx5e: xsk: Account for XSK RQ UMRs when calculating ICOSQ size

ICOSQ is used to post UMR WQEs for both regular RQ and XSK RQ. However,
space in ICOSQ is reserved only for the regular RQ, which may cause
ICOSQ overflows when using XSK (the most risk is on activating
channels).

This commit fixes the issue by reserving space for XSK UMR WQEs as well.
As XSK may be enabled without restarting the channel and recreating the
ICOSQ, this space is reserved unconditionally.

Fixes: 40e89241b3e0 ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c