DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside of an rte_memzone
@ 2014-05-09 10:14 Olivier Matz
  2014-05-09 10:14 ` [dpdk-dev] [PATCH v2 1/2] ring: introduce rte_ring_get_memsize() Olivier Matz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Olivier Matz @ 2014-05-09 10:14 UTC (permalink / raw)
  To: dev

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);


Changes included in v2:
  - fix syntax for functions definitions in rte_ring_get_memsize()
  - use RTE_ALIGN() to get nearest higher multiple of cache line size
  - fix description of rte_ring_init() in doxygen comments

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

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

-- 
1.9.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-13 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-09 10:14 [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside of an rte_memzone Olivier Matz
2014-05-09 10:14 ` [dpdk-dev] [PATCH v2 1/2] ring: introduce rte_ring_get_memsize() Olivier Matz
2014-05-09 10:14 ` [dpdk-dev] [PATCH v2 2/2] ring: introduce rte_ring_init() Olivier Matz
2014-05-09 12:17 ` [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside of an rte_memzone Ananyev, Konstantin
2014-05-13 14:32   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).