Skip to content

Commit f4c6f31

Browse files
niklas88jgunthorpe
authored andcommitted
RDMA/mlx5: Fix xlt_chunk_align calculation
The XLT chunk alignment depends on ent_size not sizeof(ent_size) aka sizeof(size_t). The incoming ent_size is either 8 or 16, so the miscalculation when 16 is required is only an over-alignment and functional harmless. Fixes: 8010d74 ("RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt()") Link: https://lore.kernel.org/r/20210908081849.7948-2-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 9660dcb commit f4c6f31

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ static struct mlx5_ib_mr *alloc_cacheable_mr(struct ib_pd *pd,
995995
static void *mlx5_ib_alloc_xlt(size_t *nents, size_t ent_size, gfp_t gfp_mask)
996996
{
997997
const size_t xlt_chunk_align =
998-
MLX5_UMR_MTT_ALIGNMENT / sizeof(ent_size);
998+
MLX5_UMR_MTT_ALIGNMENT / ent_size;
999999
size_t size;
10001000
void *res = NULL;
10011001

0 commit comments

Comments
 (0)