aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@mellanox.com>2018-08-21 16:07:58 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2018-09-05 17:08:33 -0700
commita09036221092989b88c55d24d1f12ceb1d7d361f (patch)
treee235e50a7bbeda8b57607a12aa15c57ec5a6cafa /drivers/net/ethernet
parentnet/mlx5: Use u16 for Work Queue buffer fragment size (diff)
downloadlinux-dev-a09036221092989b88c55d24d1f12ceb1d7d361f.tar.xz
linux-dev-a09036221092989b88c55d24d1f12ceb1d7d361f.zip
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/wq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
index d838af9539b1..68e7f8df2a6d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
@@ -138,7 +138,7 @@ int mlx5_wq_qp_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
void *qpc, struct mlx5_wq_qp *wq,
struct mlx5_wq_ctrl *wq_ctrl)
{
- u32 sq_strides_offset;
+ u16 sq_strides_offset;
u32 rq_pg_remainder;
int err;