]> git.droids-corp.org - dpdk.git/commit
common/mlx5: fix memory region range calculation
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Thu, 31 Mar 2022 14:33:16 +0000 (17:33 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Apr 2022 10:47:37 +0000 (12:47 +0200)
commit8113251862a0813e171d76a6a56b7f93987690ce
treee33a5b159927cfbdb4d467e4e7aa63f11285de37
parent3a29cb3a730ba0def6b088c969da379a9ffea988
common/mlx5: fix memory region range calculation

MR end for a mempool chunk may be calculated incorrectly.
For example, for chunk with addr=1.5M and len=1M with 2M page size
the range would be [0, 2M), while the proper result is [0, 4M).
Fix the calculation.

Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common_mr.c