]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net/mlx5: Fix SQ offset in QPs with small RQ
authorTariq Toukan <tariqt@mellanox.com>
Mon, 3 Sep 2018 15:06:24 +0000 (18:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 19:17:33 +0000 (12:17 -0700)
commit639505d4397b8c654a8e2616f9cb70ece40c83f9
tree47f3bb3050bd9f0e80850236e54b6994709aa226
parentfc3e3bf55f48e5b18481075b0591ca938c9dba78
net/mlx5: Fix SQ offset in QPs with small RQ

Correct the formula for calculating the RQ page remainder,
which should be in byte granularity.  The result will be
non-zero only for RQs smaller than PAGE_SIZE, as an RQ size
is a power of 2.

Divide this by the SQ stride (MLX5_SEND_WQE_BB) to get the
SQ offset in strides granularity.

Fixes: d7037ad73daa ("net/mlx5: Fix QP fragmented buffer allocation")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/wq.c