[dpdk-dev] [PATCH 11/25] distributor: use new tailq locking API

Anatoly Burakov anatoly.burakov at intel.com
Wed May 29 18:30:57 CEST 2019


Replace usages of direct access to shared memory config with
calls to the new API.

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_distributor/rte_distributor.c     | 4 ++--
 lib/librte_distributor/rte_distributor_v20.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 208abfb1d..7e2892554 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -645,9 +645,9 @@ rte_distributor_create_v1705(const char *name,
 					  rte_dist_burst_list);
 
 
-	rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
+	rte_eal_mcfg_tailq_write_lock();
 	TAILQ_INSERT_TAIL(dist_burst_list, d, next);
-	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+	rte_eal_mcfg_tailq_write_unlock();
 
 	return d;
 }
diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c
index cd5940713..beec9c051 100644
--- a/lib/librte_distributor/rte_distributor_v20.c
+++ b/lib/librte_distributor/rte_distributor_v20.c
@@ -392,9 +392,9 @@ rte_distributor_create_v20(const char *name,
 	distributor_list = RTE_TAILQ_CAST(rte_distributor_tailq.head,
 					  rte_distributor_list);
 
-	rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
+	rte_eal_mcfg_tailq_write_lock();
 	TAILQ_INSERT_TAIL(distributor_list, d, next);
-	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+	rte_eal_mcfg_tailq_write_unlock();
 
 	return d;
 }
-- 
2.17.1


More information about the dev mailing list