ring: fix the variable name error
PATCH 1/1 ring: fix the variable name error
Ring dequeue operation's parameters name should be 'cons_xx', rather than 'prod_xxx'.
Fixes 1fc73390bcf5 ("ring: refactor exported headers")
Signed-off-by Feifei Wang <[email protected]>
Reviewed-by Ruifeng Wang <[email protected]>
--- lib/ring/rte_ring_elem_pvt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
lib/ring/rte_ring_elem_pvt.h +4 -4
@@ -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)) {
Signature · 1 line
2.25.1
Quoted 6 lines
From: Feifei Wang [mailto:[email protected]]
Sent: Friday, 7 April 2023 10.48Ring dequeue operation's parameters name should be '
cons_xx', rather than 'prod_xxx'.
Quoted 6 lines
Fixes 1fc73390bcf5 ("ring: refactor exported headers")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>---
Acked-by Morten Brørup <[email protected]>
Thomas Monjalon
Applied07/04/2023 12:32, Morten Brørup:
Quoted 6 lines
Quoted 6 lines
From: Feifei Wang [mailto:[email protected]]
Sent: Friday, 7 April 2023 10.48Ring dequeue operation's parameters name should be '
cons_xx', rather than 'prod_xxx'.
Quoted 7 lines
Quoted 5 lines
Fixes 1fc73390bcf5 ("ring: refactor exported headers")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>Acked-by Morten Brørup <[email protected]>
Applied, thanks.