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)
commita09036221092989b88c55d24d1f12ceb1d7d361f
treee235e50a7bbeda8b57607a12aa15c57ec5a6cafa
parent8d71e818506718e8d7032ce824b5c74a17d4f7a5
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: 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>
drivers/net/ethernet/mellanox/mlx5/core/wq.c
include/linux/mlx5/driver.h