From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 076C0428E6 for ; Fri, 7 Apr 2023 10:48:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F221741156; Fri, 7 Apr 2023 10:48:40 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 613FE40150; Fri, 7 Apr 2023 10:48:38 +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 D41C81424; Fri, 7 Apr 2023 01:49:21 -0700 (PDT) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 31AEC3F73F; Fri, 7 Apr 2023 01:48:34 -0700 (PDT) From: Feifei Wang To: Honnappa Nagarahalli , Konstantin Ananyev , Ruifeng Wang , Feifei Wang Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org Subject: [PATCH] ring: fix the variable name error Date: Fri, 7 Apr 2023 16:48:25 +0800 Message-Id: <20230407084826.2159688-1-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Ring dequeue operation's parameters name should be 'cons_xx', rather than 'prod_xxx'. Fixes: 1fc73390bcf5 ("ring: refactor exported headers") Cc: stable@dpdk.org Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- lib/ring/rte_ring_elem_pvt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h index e24e4492ff..4b80f58980 100644 --- a/lib/ring/rte_ring_elem_pvt.h +++ b/lib/ring/rte_ring_elem_pvt.h @@ -194,12 +194,12 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size, } static __rte_always_inline void -__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head, +__rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t cons_head, void *obj_table, uint32_t n) { unsigned int i; const uint32_t size = r->size; - uint32_t idx = prod_head & r->mask; + uint32_t idx = cons_head & r->mask; uint64_t *ring = (uint64_t *)&r[1]; unaligned_uint64_t *obj = (unaligned_uint64_t *)obj_table; if (likely(idx + n <= size)) { @@ -227,12 +227,12 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head, } static __rte_always_inline void -__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head, +__rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t cons_head, void *obj_table, uint32_t n) { unsigned int i; const uint32_t size = r->size; - uint32_t idx = prod_head & r->mask; + uint32_t idx = cons_head & r->mask; rte_int128_t *ring = (rte_int128_t *)&r[1]; rte_int128_t *obj = (rte_int128_t *)obj_table; if (likely(idx + n <= size)) { -- 2.25.1