From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id 660D4312 for ; Fri, 9 May 2014 12:15:02 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id u56so3651447wes.23 for ; Fri, 09 May 2014 03:15:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Fx1cgIPUfw/tfQzgyRCjwa/zs09zBVYBgO6q0OYXeP8=; b=auYc3Ax4yxZAWtvnYLoah+e0j0r0xdyICmlm1Xsl1QcIVb/S/qx9/m243ejIsf/iph 3JwcGzX/PNtsN85z3tbKYKxm7UCx8kOUVPnNTswFy80JSzZ9Eofg0DVR2a9WqTwa2Yct N60F4CAqaQLnt3tDY592TAvWmPDVFOrilYMEoXY64cQnjtDqB8ogpf0AneBD+vm1kjIL xNK8BZfppuk4HMZ2hqkX99OayPIHe8SMBPk1HQBDDp1ZtDUfg5NikHSJzPJnVPWV2Tf/ a20lNnuH4hK818eDhu9zj+yqOzH5Xxjvh6HZvMqIuIZpmNzaEbLeIidpW0VYkIY1SJ5T GHQg== X-Gm-Message-State: ALoCoQlyzcmFjLr18A1q2fRJsdy4/PgEGBPdaKVt54zxUQnmxv/48Ej6EJunhPj15imJbCOTWxYr X-Received: by 10.180.74.78 with SMTP id r14mr2684028wiv.2.1399630508447; Fri, 09 May 2014 03:15:08 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id h3sm4275975wiz.16.2014.05.09.03.15.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 May 2014 03:15:07 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Fri, 9 May 2014 12:14:51 +0200 Message-Id: <1399630493-26739-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.9.2 Subject: [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside of an rte_memzone X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 10:15:02 -0000 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