From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 71698C69A for ; Thu, 30 Jul 2015 23:28:09 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 30 Jul 2015 14:28:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,579,1432623600"; d="scan'208";a="758745494" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 30 Jul 2015 14:28:07 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.223]) by IRSMSX101.ger.corp.intel.com ([169.254.1.216]) with mapi id 14.03.0224.002; Thu, 30 Jul 2015 22:28:06 +0100 From: "Ananyev, Konstantin" To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [PATCH v2] mbuf: enforce alignment of mbuf private area Thread-Index: AQHQyuQM5iTcJr+zXkGycqtQogPtZZ30hzzw Date: Thu, 30 Jul 2015 21:28:06 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836A6B5A2@irsmsx105.ger.corp.intel.com> References: <1438264561-18359-1-git-send-email-olivier.matz@6wind.com> <1438273337-13211-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1438273337-13211-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.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] mbuf: enforce alignment of mbuf private area 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: Thu, 30 Jul 2015 21:28:10 -0000 > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Thursday, July 30, 2015 5:22 PM > To: dev@dpdk.org > Cc: Ananyev, Konstantin; olivier.matz@6wind.com; Zhang, Helin; martin.wei= ser@allegro-packets.com; thomas.monjalon@6wind.com > Subject: [PATCH v2] mbuf: enforce alignment of mbuf private area >=20 > 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. >=20 > 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. >=20 > 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(). >=20 > By the way, also add the MBUF log type. >=20 > Signed-off-by: Olivier Matz > --- Acked-by: Konstantin Ananyev