net/mlx5: use thread safe index pool for flow objects
authorSuanming Mou <suanmingm@nvidia.com>
Wed, 28 Oct 2020 09:33:20 +0000 (17:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:04 +0000 (23:35 +0100)
As mlx5 PMD is changed to be thread safe, all the flow-related
sub-objects inside the PMD should be thread safe. This commit
changes the index memory pools' lock configuration to be enabled.
That makes the index pool be thread safe.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5.c

index 27c9c2a..dc5b7a4 100644 (file)
@@ -191,7 +191,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -202,7 +202,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -213,7 +213,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -224,7 +224,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -235,7 +235,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -246,7 +246,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -257,7 +257,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -269,7 +269,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -280,7 +280,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -291,7 +291,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,
@@ -306,7 +306,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = {
                .trunk_size = 64,
                .grow_trunk = 3,
                .grow_shift = 2,
-               .need_lock = 0,
+               .need_lock = 1,
                .release_mem_en = 1,
                .malloc = mlx5_malloc,
                .free = mlx5_free,