mbuf: add GTP tunnel type
[dpdk.git] / lib / librte_ring / rte_ring.c
index 9ea26a6..d9b3080 100644 (file)
@@ -30,6 +30,7 @@
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_spinlock.h>
+#include <rte_tailq.h>
 
 #include "rte_ring.h"
 
@@ -62,6 +63,13 @@ rte_ring_get_memsize(unsigned count)
        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)