[dpdk-dev] [PATCH 0/2] ring: allow to init a rte_ring outside of an rte_memzone

Olivier Matz olivier.matz at 6wind.com
Wed May 7 13:38:29 CEST 2014


These 2 patches adds 2 new functions that permits to initialize and use
a rte_ring anywhere in memory.

Before this patches, only rte_ring_create() was available. This function
allocates a rte_memzone (that cannot be freed) and initializes a ring
inside.

This series allows to do the following:
  size = rte_ring_get_memsize(1024);
  r = malloc(size);
  rte_ring_init(r, "my_ring", 1024, 0);


Olivier Matz (2):
  ring: introduce rte_ring_get_memsize()
  ring: introduce rte_ring_init()

 lib/librte_ring/rte_ring.c | 88 +++++++++++++++++++++++++++++-----------------
 lib/librte_ring/rte_ring.h | 67 ++++++++++++++++++++++++++++++++---
 2 files changed, 118 insertions(+), 37 deletions(-)

-- 
1.9.2



More information about the dev mailing list