X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ring%2Frte_ring.h;h=2a9f768a1cafc64c2c279b3bf1122d5ae35e7d46;hb=ae65004fa7d2e72c1d640148eba1dbb6c52aacf1;hp=e265e947909bfd14941bb588446dbb076be80e82;hpb=8bd5f07c7a1ac0c5b8d16758efc3ada3e16b0adc;p=dpdk.git diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index e265e94790..2a9f768a1c 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -61,8 +61,6 @@ enum rte_ring_queue_behavior { #define RTE_RING_NAMESIZE (RTE_MEMZONE_NAMESIZE - \ sizeof(RTE_RING_MZ_PREFIX) + 1) -struct rte_memzone; /* forward declaration, so as not to require memzone.h */ - /* structure to hold a pair of head/tail values and other metadata */ struct rte_ring_headtail { volatile uint32_t head; /**< Prod/consumer head. */ @@ -670,6 +668,23 @@ rte_ring_dequeue(struct rte_ring *r, void **obj_p) return rte_ring_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOENT; } +/** + * Flush a ring. + * + * This function flush all the elements in a ring + * + * @b EXPERIMENTAL: this API may change without prior notice + * + * @warning + * Make sure the ring is not in use while calling this function. + * + * @param r + * A pointer to the ring structure. + */ +__rte_experimental +void +rte_ring_reset(struct rte_ring *r); + /** * Return the number of entries in a ring. *