diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c index c9e59d4cf0..4e78e144c9 100644 --- a/lib/librte_ring/rte_ring.c +++ b/lib/librte_ring/rte_ring.c @@ -196,6 +196,7 @@ rte_ring_create(const char *name, unsigned count, int socket_id, rte_ring_init(r, name, count, flags); te->data = (void *) r; + r->memzone = mz; TAILQ_INSERT_TAIL(ring_list, te, next); } else { diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index af68888fc1..df45f3ff99 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -134,6 +134,8 @@ struct rte_ring_debug_stats { * if RTE_RING_PAUSE_REP not defined. */ #endif +struct rte_memzone; /* forward declaration, so as not to require memzone.h */ + /** * An RTE ring structure. * @@ -147,6 +149,8 @@ struct rte_ring_debug_stats { struct rte_ring { char name[RTE_RING_NAMESIZE]; /**< Name of the ring. */ int flags; /**< Flags supplied at creation. */ + const struct rte_memzone *memzone; + /**< Memzone, if any, containing the rte_ring */ /** Ring producer status. */ struct prod {