From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B08245A38 for ; Thu, 30 Jul 2015 18:25:36 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 30 Jul 2015 09:25:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,577,1432623600"; d="scan'208";a="533149087" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by FMSMGA003.fm.intel.com with ESMTP; 30 Jul 2015 09:25:34 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 31 Jul 2015 00:25:33 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.45]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.38]) with mapi id 14.03.0224.002; Fri, 31 Jul 2015 00:25:31 +0800 From: "Zhang, Helin" To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [PATCH v2] mbuf: enforce alignment of mbuf private area Thread-Index: AQHQyuQJQ3U8UzetOUicn4XtRyZ/bJ30MswA Date: Thu, 30 Jul 2015 16:25:31 +0000 Message-ID: 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-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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 16:25:37 -0000 > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Thursday, July 30, 2015 9:22 AM > To: dev@dpdk.org > Cc: Ananyev, Konstantin; olivier.matz@6wind.com; Zhang, Helin; > martin.weiser@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 ther= e is one, > the alignment depends on the size of this area that is located between th= e mbuf > structure and the data buffer. >=20 > Indeed, some drivers expects to have the buffer address aligned to an eve= n > 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 constrai= nt > before creating the mempool. For applications that use the alternative wa= y > (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: Helin Zhang