Skip to content

Commit

Permalink
ring: fix dequeue parameter name
Browse files Browse the repository at this point in the history
[ upstream commit b632e76751ff9797e36531305638e1cbd14ffa09 ]

Ring dequeue operation's parameters name should be 'cons_xx',
rather than 'prod_xxx'.

Fixes: 1fc7339 ("ring: refactor exported headers")

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>
  • Loading branch information
Feifeiarm authored and kevintraynor committed Jul 11, 2023
1 parent c95d48b commit 4b8a602
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ring/rte_ring_elem_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 4b8a602

Please sign in to comment.