From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] mbuf: enforce alignment of mbuf private area Date: Mon, 03 Aug 2015 00:35:32 +0200 Message-ID: <4068420.gylT6sbKzz@xps13> References: <1438264561-18359-1-git-send-email-olivier.matz@6wind.com> <1438273337-13211-1-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB97725836A6B5A2@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Olivier Matz Return-path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id F0E37C430 for ; Mon, 3 Aug 2015 00:36:46 +0200 (CEST) Received: by wicmv11 with SMTP id mv11so114243641wic.0 for ; Sun, 02 Aug 2015 15:36:46 -0700 (PDT) In-Reply-To: <2601191342CEEE43887BDE71AB97725836A6B5A2@irsmsx105.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > It looks better to have a data buffer address that is aligned to > > 8 bytes. This is the case when there is no mbuf private area, but > > if there is one, the alignment depends on the size of this area > > that is located between the mbuf structure and the data buffer. > > > > Indeed, some drivers expects to have the buffer address aligned > > to an even address, and moreover an unaligned buffer may impact > > the performance when accessing to network headers. > > > > Add a check in rte_pktmbuf_pool_create() to verify the alignment > > constraint before creating the mempool. For applications that use > > the alternative way (direct call to rte_mempool_create), also > > add an assertion in rte_pktmbuf_init(). > > > > By the way, also add the MBUF log type. > > > > Signed-off-by: Olivier Matz > > Acked-by: Konstantin Ananyev Applied, thanks