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)
commit8d71e818506718e8d7032ce824b5c74a17d4f7a5
tree1c20f622f9f26092a94a121d782b38f68ca4302f
parent5df816e7f43f1297c40021ef17ec6e722b45c82f
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: 388ca8be0037 ("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