From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 38E3A1E9BA; Thu, 14 Jun 2018 09:29:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2018 00:29:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,222,1526367600"; d="scan'208";a="63059345" Received: from jbeyer-mobl1.amr.corp.intel.com (HELO [10.252.12.131]) ([10.252.12.131]) by fmsmga004.fm.intel.com with ESMTP; 14 Jun 2018 00:29:15 -0700 To: Dariusz Stojaczyk , dev@dpdk.org Cc: stable@dpdk.org References: <1528916894-1991-1-git-send-email-dariuszx.stojaczyk@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 14 Jun 2018 08:29:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1528916894-1991-1-git-send-email-dariuszx.stojaczyk@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] memory: fix alignment in eal_get_virtual_area() X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 07:29:17 -0000 On 13-Jun-18 8:08 PM, Dariusz Stojaczyk wrote: > Although the alignment mechanism works as intended, the > `no_align` bool flag was set incorrectly. We were aligning > buffers that didn't need extra alignment, and weren't > aligning ones that really needed it. > > Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory") > Cc: anatoly.burakov@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Dariusz Stojaczyk > --- > lib/librte_eal/common/eal_common_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c > index 4f0688f..a7c89f0 100644 > --- a/lib/librte_eal/common/eal_common_memory.c > +++ b/lib/librte_eal/common/eal_common_memory.c > @@ -70,7 +70,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size, > * system page size is the same as requested page size. > */ > no_align = (requested_addr != NULL && > - ((uintptr_t)requested_addr & (page_sz - 1)) == 0) || > + ((uintptr_t)requested_addr & (page_sz - 1))) || > page_sz == system_page_sz; > > do { > Acked-by: Anatoly Burakov -- Thanks, Anatoly