git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8d909a
)
ring: fix tail in peek API for ST mode
author
Feifei Wang
<feifei.wang2@arm.com>
Sun, 28 Jun 2020 06:23:47 +0000
(14:23 +0800)
committer
David Marchand
<david.marchand@redhat.com>
Wed, 1 Jul 2020 08:41:19 +0000
(10:41 +0200)
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")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_ring/rte_ring_peek_c11_mem.h
patch
|
blob
|
history
diff --git
a/lib/librte_ring/rte_ring_peek_c11_mem.h
b/lib/librte_ring/rte_ring_peek_c11_mem.h
index
99321f1
..
283c7e7
100644
(file)
--- 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;
}