DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 0/2] ring: allow to init a rte_ring outside of an rte_memzone
Date: Wed,  7 May 2014 13:38:29 +0200	[thread overview]
Message-ID: <1399462711-12815-1-git-send-email-olivier.matz@6wind.com> (raw)

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

             reply	other threads:[~2014-05-07 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 11:38 Olivier Matz [this message]
2014-05-07 11:38 ` [dpdk-dev] [PATCH 1/2] ring: introduce rte_ring_get_memsize() Olivier Matz
2014-05-07 12:35   ` Ananyev, Konstantin
2014-05-07 13:04     ` Olivier MATZ
2014-05-07 11:38 ` [dpdk-dev] [PATCH 2/2] ring: introduce rte_ring_init() Olivier Matz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399462711-12815-1-git-send-email-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).