[dpdk-stable] [PATCH] ring: fix error vlaue of tail in the peek API for ST mode
Feifei Wang
feifei.wang2 at arm.com
Sun Jun 28 08:23:47 CEST 2020
The value of *tail should be the prod->tail not prod->head. After
modification, it can record 'tail' so head/tail can be updated
accordingly.
Fixes: 664ff4b1729b ("ring: introduce peek style API")
Cc: stable at dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2 at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
lib/librte_ring/rte_ring_peek_c11_mem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ring/rte_ring_peek_c11_mem.h b/lib/librte_ring/rte_ring_peek_c11_mem.h
index 99321f124..283c7e70b 100644
--- a/lib/librte_ring/rte_ring_peek_c11_mem.h
+++ b/lib/librte_ring/rte_ring_peek_c11_mem.h
@@ -40,7 +40,7 @@ __rte_ring_st_get_tail(struct rte_ring_headtail *ht, uint32_t *tail,
RTE_ASSERT(n >= num);
num = (n >= num) ? num : 0;
- *tail = h;
+ *tail = t;
return num;
}
--
2.17.1
More information about the stable
mailing list