summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5
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 /include/linux/mlx5
parent8d71e818506718e8d7032ce824b5c74a17d4f7a5 (diff)
downloadlinux-stable-a09036221092989b88c55d24d1f12ceb1d7d361f.tar.gz
linux-stable-a09036221092989b88c55d24d1f12ceb1d7d361f.tar.bz2
linux-stable-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 'include/linux/mlx5')
-rw-r--r--include/linux/mlx5/driver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 3a1258fd8ac3..66d94b4557cf 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -363,7 +363,7 @@ struct mlx5_frag_buf_ctrl {
struct mlx5_frag_buf frag_buf;
u32 sz_m1;
u16 frag_sz_m1;
- u32 strides_offset;
+ u16 strides_offset;
u8 log_sz;
u8 log_stride;
u8 log_frag_strides;
@@ -995,7 +995,7 @@ static inline u32 mlx5_base_mkey(const u32 key)
}
static inline void mlx5_fill_fbc_offset(u8 log_stride, u8 log_sz,
- u32 strides_offset,
+ u16 strides_offset,
struct mlx5_frag_buf_ctrl *fbc)
{
fbc->log_stride = log_stride;