]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Use u16 for Work Queue buffer strides offset
authorTariq Toukan <tariqt@mellanox.com>
Tue, 21 Aug 2018 13:07:58 +0000 (16:07 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Sep 2018 00:08:33 +0000 (17:08 -0700)
commitb8fff08bd23a4b8aee6b416df4167d05f780680f
treee235e50a7bbeda8b57607a12aa15c57ec5a6cafa
parent65497db6444fc2a91ba3771ca0426758fafb2637
net/mlx5: Use u16 for Work Queue buffer strides offset

Minimal stride size is 16.
Hence, the number of strides in a fragment (of PAGE_SIZE)
is <= PAGE_SIZE / 16 <= 4K.

u16 is sufficient to represent this.

Fixes: 4d8df7ccad94 ("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>
drivers/net/ethernet/mellanox/mlx5/core/wq.c
include/linux/mlx5/driver.h