]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Use u16 for Work Queue buffer fragment size
authorTariq Toukan <tariqt@mellanox.com>
Tue, 21 Aug 2018 13:04:41 +0000 (16:04 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Sep 2018 00:08:33 +0000 (17:08 -0700)
commit65497db6444fc2a91ba3771ca0426758fafb2637
tree1c20f622f9f26092a94a121d782b38f68ca4302f
parent86de138ffabf18c30250f589c889e6538d5fa39d
net/mlx5: Use u16 for Work Queue buffer fragment size

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: 039de91e4a6c ("IB/mlx5: Implement fragmented completion queue (CQ)")
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
drivers/net/ethernet/mellanox/mlx5/core/wq.h
include/linux/mlx5/driver.h