From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CDB195AAB for ; Fri, 16 Jan 2015 16:37:38 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 16 Jan 2015 07:37:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,411,1418112000"; d="scan'208";a="662997360" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga002.fm.intel.com with ESMTP; 16 Jan 2015 07:37:36 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.64]) by IRSMSX109.ger.corp.intel.com ([169.254.13.11]) with mapi id 14.03.0195.001; Fri, 16 Jan 2015 15:37:19 +0000 From: "De Lara Guarch, Pablo" To: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] eal / malloc : alignment parameter check failing due to changes in rte_is_power_of_2 Thread-Index: AQHQMZ6oJ5csCDN580mk1y7v+51Op5zC4UTw Date: Fri, 16 Jan 2015 15:37:18 +0000 Message-ID: References: <1421421030-22261-1-git-send-email-declan.doherty@intel.com> In-Reply-To: <1421421030-22261-1-git-send-email-declan.doherty@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal / malloc : alignment parameter check failing due to changes in rte_is_power_of_2 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, 16 Jan 2015 15:37:39 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty > Sent: Friday, January 16, 2015 3:11 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] eal / malloc : alignment parameter check fail= ing > due to changes in rte_is_power_of_2 >=20 > In commit 2fc8d6d the behaviour of function rte_is_power_of_2 was > changed to not return true for 0. memzone_reserve_aligned_thread_unsafe > and rte_malloc_socket both make the assumption that for align =3D 0 > !rte_is_power_of_2(align) will return false. This patch adds a check > that align parameter is non-zero before doing the power of 2 check >=20 > Signed-off-by: Declan Doherty Acked-by: Pablo de Lara