]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: DR, Fix QP continuous allocation
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Mon, 14 Nov 2022 22:11:38 +0000 (00:11 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 14 Apr 2023 22:06:21 +0000 (15:06 -0700)
commit17dc71c336aac381f59ba541cf85fb0c192d1c1c
tree0dfaae438fbbd93d78da138aa7038cde3ddd93f6
parent7d7c9453d679fe55d72d63bacb3b639cd963ebc0
net/mlx5: DR, Fix QP continuous allocation

When allocating a QP we allocate an RQ and an SQ, the RQ is stored first
in memory and followed by the SQ.
This allocation is not physically continiuos - it may span across different
physical pages. SW Steering code always writes in pairs: 1BB write + 1BB read,
or 2 continuous BBs of GTA WQE.

This lead to an issue where RQ allocation was 4x16 which is equal to 1 WQE BB,
causing 1 BB offset in the page and splitting the GTA WQE between different
physical pages.

The solution was to create the RQ with a even number of BBs and to have the
RQ aligned to a page.

Signed-off-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c