net/mlx5: fix indexed pool bitmap initialization
authorSuanming Mou <suanmingm@mellanox.com>
Tue, 28 Apr 2020 09:13:37 +0000 (17:13 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
commit691b3d3ebb6acf7f6a88b64690b1f6b319ab7b6d
treed03a9ed396a5e46dd0282c3f0f37ba656ee51570
parent9a6ea33af9fac4c2a00a4bb595875a393a90b12d
net/mlx5: fix indexed pool bitmap initialization

Currently, the indexed memory pool bitmap start address is not aligned
to cacheline size explicitly. The bitmap initialization requires the
address should be cacheline aligned. In that case, the initialization
maybe failed if the address is not cacheline aligned.

Add RTE_CACHE_LINE_ROUNDUP() to the trunk size calculation to make sure
the bitmap offset address will start with cacheline aligned.

Fixes: a3cf59f56c47 ("net/mlx5: add indexed memory pool")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Tested-by: Lijian Zhang <lijian.zhang@arm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
drivers/net/mlx5/mlx5_utils.c
drivers/net/mlx5/mlx5_utils.h