patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Wenbo Cao <caowenbo@mucse.com>
To: caowenbo@mucse.com
Cc: "Feifei Wang" <feifei.wang2@arm.com>,
	stable@dpdk.org, "Ruifeng Wang" <ruifeng.wang@arm.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH 1/3] ring: fix dequeue parameter name
Date: Wed, 31 May 2023 05:23:31 +0000	[thread overview]
Message-ID: <20230531052333.132446-1-caowenbo@mucse.com> (raw)

From: Feifei Wang <feifei.wang2@arm.com>

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>
---
 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.27.0


             reply	other threads:[~2023-05-31 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  5:23 Wenbo Cao [this message]
2023-05-31  5:23 ` [PATCH 2/3] pipeline: fix double free for table stats Wenbo Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230531052333.132446-1-caowenbo@mucse.com \
    --to=caowenbo@mucse.com \
    --cc=feifei.wang2@arm.com \
    --cc=mb@smartsharesystems.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).