From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 30031201 for ; Wed, 7 Nov 2018 11:14:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 02:14:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,475,1534834800"; d="scan'208";a="279037393" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.143]) ([10.237.220.143]) by fmsmga006.fm.intel.com with ESMTP; 07 Nov 2018 02:14:31 -0800 To: Alejandro Lucero , dev@dpdk.org References: <20181107094456.23123-1-alejandro.lucero@netronome.com> From: "Burakov, Anatoly" Message-ID: Date: Wed, 7 Nov 2018 10:14:30 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181107094456.23123-1-alejandro.lucero@netronome.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mem: fix DMA mask width sanity check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 10:14:33 -0000 On 07-Nov-18 9:44 AM, Alejandro Lucero wrote: > Current code has different max DMA mask width values for 32 and 64 > bits systems. IOMMU hardware could report a higher supported width > than current MAX_DMA_MASK_BITS when RTE_ARCH_64 is not defined. This > is actually true with a 32 bits kernel running in a 64 bits server > with IOMMU hardware. This could also be a problem with embedded systems > using an IOMMU designed for 64 bits in a 32 bits system. > > This patch leaves a single max DMA mask width which will make sure the > mask width is within the range for 64 bits variables used for DMA mask. > This also will avoid wrong values because any value higher than > 64 bits is likely wrong. > > Signed-off-by: Alejandro Lucero > --- Acked-by: Anatoly Burakov -- Thanks, Anatoly