ring: fix the variable name error

Message ID 20230407084826.2159688-1-feifei.wang2@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series ring: fix the variable name error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Feifei Wang April 7, 2023, 8:48 a.m. UTC
  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 <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/ring/rte_ring_elem_pvt.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Morten Brørup April 7, 2023, 10:32 a.m. UTC | #1
> From: Feifei Wang [mailto:feifei.wang2@arm.com]
> Sent: Friday, 7 April 2023 10.48
> 
> 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 <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Morten Brørup <mb@smartsharesystems.com>
  
Thomas Monjalon May 24, 2023, 9 p.m. UTC | #2
07/04/2023 12:32, Morten Brørup:
> > From: Feifei Wang [mailto:feifei.wang2@arm.com]
> > Sent: Friday, 7 April 2023 10.48
> > 
> > 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 <feifei.wang2@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> 
> Acked-by: Morten Brørup <mb@smartsharesystems.com>

Applied, thanks.
  

Patch

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)) {