ring: fix error vlaue of tail in the peek API for ST mode
PATCH 1/1 ring: fix error vlaue of tail in the peek API for ST mode
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.
--- lib/librte_ring/rte_ring_peek_c11_mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_ring/rte_ring_peek_c11_mem.h +1 -1
@@ -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; }
Signature · 1 line
2.17.1
Quoted 27 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Sunday, June 28, 2020 7:24 AM
To: Honnappa Nagarahalli <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; [email protected]
Subject: [PATCH] ring: fix error vlaue of tail in the peek API for ST modeThe value of *tail should be the
prod->tailnotprod->head. After modification, it can record 'tail' so head/tail can be updated accordingly.Fixes 664ff4b1729b ("ring: introduce peek style API")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>--- lib/librte_ring/rte_ring_peek_c11_mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_ring/rte_ring_peek_c11_mem.h +0
-0
lib/librte_ring/rte_ring_peek_c11_mem.h __rte_ring_st_get_tail(struct rte_ring_headtail *ht, uint32_t *tail,
Quoted 9 lines
lib/librte_ring/rte_ring_peek_c11_mem.h +1
-2@@ -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; } --
Thanks for the fix.
Quoted 1 line
2.17.1
David Marchand
AppliedQuoted 11 lines · Konstantin
Quoted 11 lines
-----Original Message-----
From: Feifei Wang <[email protected]>
Sent: Sunday, June 28, 2020 7:24 AM
To: Honnappa Nagarahalli <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; [email protected]; Feifei Wang <[email protected]>; [email protected]
Subject: [PATCH] ring: fix error vlaue of tail in the peek API for ST modeThe value of *tail should be the
prod->tailnotprod->head. After modification, it can record 'tail' so head/tail can be updated accordingly.
Quoted 6 lines
Quoted 5 lines
Fixes 664ff4b1729b ("ring: introduce peek style API")Signed-off-by Feifei Wang <[email protected]>Reviewed-by Ruifeng Wang <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand