git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ring: add reset function for flushing
[dpdk.git]
/
lib
/
librte_ring
/
rte_ring.c
diff --git
a/lib/librte_ring/rte_ring.c
b/lib/librte_ring/rte_ring.c
index
b30b2aa
..
d9b3080
100644
(file)
--- a/
lib/librte_ring/rte_ring.c
+++ b/
lib/librte_ring/rte_ring.c
@@
-63,6
+63,13
@@
rte_ring_get_memsize(unsigned count)
return sz;
}
return sz;
}
+void
+rte_ring_reset(struct rte_ring *r)
+{
+ r->prod.head = r->cons.head = 0;
+ r->prod.tail = r->cons.tail = 0;
+}
+
int
rte_ring_init(struct rte_ring *r, const char *name, unsigned count,
unsigned flags)
int
rte_ring_init(struct rte_ring *r, const char *name, unsigned count,
unsigned flags)