From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D5FAA054F; Mon, 1 Mar 2021 11:09:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11CD34067B; Mon, 1 Mar 2021 11:09:43 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id B4A814014E for ; Mon, 1 Mar 2021 11:09:41 +0100 (CET) IronPort-SDR: lQtnmTwK3LpJnBUtcFsdIg6ekDPb2rBrV12gjaiaJBXu9czLMkkzcTlkJtlmeodF1HX6d3uKfI LI8E/S+MNVqA== X-IronPort-AV: E=McAfee;i="6000,8403,9909"; a="250469539" X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="250469539" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 02:09:40 -0800 IronPort-SDR: 6mFtxUsO/oU0zHuYBoBIq/cY0bmKYzZ9Wl2N9k7715VXYQcX4oiolj7TK3iae7qIpjkONQ7yih z0PQpL4Nxk3A== X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="406161955" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.9.51]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 01 Mar 2021 02:09:37 -0800 Date: Mon, 1 Mar 2021 10:09:34 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, ncopa@alpinelinux.org, Anatoly Burakov , Stephen Hemminger , Long Li , Jay Zhou , Timothy McDaniel , Rasesh Mody , Shahed Shaikh , Andrew Boyer , Maxime Coquelin , Chenbo Xia , Xiao Wang Message-ID: <20210301100934.GC1251@bricha3-MOBL.ger.corp.intel.com> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210228125353.2436562-8-thomas@monjalon.net> <20210301094102.GA1251@bricha3-MOBL.ger.corp.intel.com> <3488412.QTiPZ3pNak@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3488412.QTiPZ3pNak@thomas> Subject: Re: [dpdk-dev] [PATCH v6 07/17] drivers: replace page size definitions with function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 01, 2021 at 10:53:46AM +0100, Thomas Monjalon wrote: > 01/03/2021 10:41, Bruce Richardson: > > On Sun, Feb 28, 2021 at 01:53:42PM +0100, Thomas Monjalon wrote: > > > The page size is often retrieved from the macro PAGE_SIZE. > > > If PAGE_SIZE is not defined, it is either using hard coded default, > > > or getting the system value from the UNIX-only function sysconf(). > > > > > > Such definitions are replaced with the generic function > > > rte_mem_page_size() defined for each supported OS. > > > > > > Removing PAGE_SIZE definitions will fix dlb drivers for musl libc, > > > because #ifdef checks were missing, causing redefinition errors. > > > > > > Signed-off-by: Thomas Monjalon > > > --- > > Is the header file with the rte_mem_page_size() function missing from this > > patch? > > No, the function exists since DPDK 20.08. > > > Also, rather than a function for this, would it not be better to keep it as > > a macro as RTE_PAGE_SIZE, to keep it more in line with the macro people > > expect to have available? > > No because the size is not always known at compilation time. > See the implementation: > https://git.dpdk.org/dpdk/commit/?id=c4b89ecb64eae > Ok, thanks for the explanation.