From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EADA8A0517; Wed, 10 Jun 2020 05:39:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE7FE29CB; Wed, 10 Jun 2020 05:39:49 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 212491DB8; Wed, 10 Jun 2020 05:39:48 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 641841FB; Tue, 9 Jun 2020 20:39:47 -0700 (PDT) Received: from net-arm-c2400.shanghai.arm.com (net-arm-c2400.shanghai.arm.com [10.169.40.212]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 430A83F73D; Tue, 9 Jun 2020 20:39:45 -0700 (PDT) From: Feifei Wang To: Honnappa Nagarahalli , Konstantin Ananyev Cc: dev@dpdk.org, nd@arm.com, Feifei Wang , stable@dpdk.org Date: Wed, 10 Jun 2020 11:39:18 +0800 Message-Id: <20200610033918.45834-1-feifei.wang2@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] lib/ring: fix the bug of HTS/RTS bulk enqueue 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" Directly call "_rte_ring_do_enqueue_elem" function can result in the process skips the "switch" order and cannot call the APIs of RTS and HTS mode in "rte_ring_enqueue_bulk_elem" function. To fix it, remove the unnecessary function and make "_rte_ring_do_enqueue_elem" consistent with "_rte_ring_do_dequeue_elem". Fixes: e6ba4731c0f3 ("ring: introduce RTS ring mode") Cc: stable@dpdk.org Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- lib/librte_ring/rte_ring_elem.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h index a5a4c46f9..469aee7da 100644 --- a/lib/librte_ring/rte_ring_elem.h +++ b/lib/librte_ring/rte_ring_elem.h @@ -578,9 +578,6 @@ static __rte_always_inline unsigned int rte_ring_enqueue_bulk_elem(struct rte_ring *r, const void *obj_table, unsigned int esize, unsigned int n, unsigned int *free_space) { - return __rte_ring_do_enqueue_elem(r, obj_table, esize, n, - RTE_RING_QUEUE_FIXED, r->prod.sync_type, free_space); - switch (r->prod.sync_type) { case RTE_RING_SYNC_MT: return rte_ring_mp_enqueue_bulk_elem(r, obj_table, esize, n, -- 2.17.1