From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 06C5D532D for ; Fri, 9 May 2014 14:17:27 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 09 May 2014 05:12:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,1018,1389772800"; d="scan'208";a="508982467" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 09 May 2014 05:17:21 -0700 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 9 May 2014 13:17:20 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.70]) by IRSMSX151.ger.corp.intel.com ([163.33.192.59]) with mapi id 14.03.0123.003; Fri, 9 May 2014 13:17:20 +0100 From: "Ananyev, Konstantin" To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside of an rte_memzone Thread-Index: AQHPa2+pxi6fZS2OwEKimlra0oqHp5s4KjwQ Date: Fri, 9 May 2014 12:17:20 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580EFA4879@IRSMSX105.ger.corp.intel.com> References: <1399630493-26739-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1399630493-26739-1-git-send-email-olivier.matz@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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 12:17:28 -0000 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz Sent: Friday, May 09, 2014 11:15 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2 0/2] ring: allow to init a rte_ring outside o= f an rte_memzone 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 =3D rte_ring_get_memsize(1024); r =3D 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(-) --=20 Acked-by: Konstantin Ananyev