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)
commit52586d2f56b3e4f528ca7268d65074e92c936681
tree971f0ca00b782ba7adc2196951b416b3453f6723
parent562696c3c62c7c23dd896e9447252ce9268cb812
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: db05815b36cb ("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