[v2] lib/ring: fix bulk enqueue API to allow HTS/RTS modes

Message ID 20200610055704.5117-1-feifei.wang2@arm.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v2] lib/ring: fix bulk enqueue API to allow HTS/RTS modes |

Checks

Context Check Description
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/checkpatch warning coding style issues
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Feifei Wang June 10, 2020, 5:57 a.m. UTC
  Remove the unwanted call to "_rte_ring_do_enqueue_elem" to allow for
correct handling of RTS/HTS modes.

Fixes: e6ba4731c0f3 ("ring: introduce RTS ring mode")
Cc: stable@dpdk.org

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---

V2: update commit message as Honnappa suggested.

 lib/librte_ring/rte_ring_elem.h | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

David Marchand July 1, 2020, 8:44 a.m. UTC | #1
On Wed, Jun 10, 2020 at 7:57 AM Feifei Wang <feifei.wang2@arm.com> wrote:
>
> Remove the unwanted call to "_rte_ring_do_enqueue_elem" to allow for
> correct handling of RTS/HTS modes.
>
> Fixes: e6ba4731c0f3 ("ring: introduce RTS ring mode")
> Cc: stable@dpdk.org
>
> Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Kept ack from Konstantin on v1.
Applied, thanks.
  

Patch

diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h
index a5a4c46f9..469aee7da 100644
--- a/lib/librte_ring/rte_ring_elem.h
+++ b/lib/librte_ring/rte_ring_elem.h
@@ -578,9 +578,6 @@  static __rte_always_inline unsigned int
 rte_ring_enqueue_bulk_elem(struct rte_ring *r, const void *obj_table,
 		unsigned int esize, unsigned int n, unsigned int *free_space)
 {
-	return __rte_ring_do_enqueue_elem(r, obj_table, esize, n,
-			RTE_RING_QUEUE_FIXED, r->prod.sync_type, free_space);
-
 	switch (r->prod.sync_type) {
 	case RTE_RING_SYNC_MT:
 		return rte_ring_mp_enqueue_bulk_elem(r, obj_table, esize, n,