From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CF65EA045E for ; Wed, 29 May 2019 18:33:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4589B1B9C6; Wed, 29 May 2019 18:31:41 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0C0871B9AA for ; Wed, 29 May 2019 18:31:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 09:31:32 -0700 X-ExtLoop1: 1 Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.125]) by orsmga005.jf.intel.com with ESMTP; 29 May 2019 09:31:31 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: David Hunt , stephen@networkplumber.org, thomas@monjalon.net, david.marchand@redhat.com Date: Wed, 29 May 2019 17:30:57 +0100 Message-Id: <0a2c75ef7a4c4fc7f13604791f304877a19c371c.1559147228.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 11/25] distributor: use new tailq locking API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace usages of direct access to shared memory config with calls to the new API. Signed-off-by: Anatoly Burakov --- 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