From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 799D8A00BE; Thu, 28 May 2020 14:21:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3BC651DBA3; Thu, 28 May 2020 14:21:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id AC0D11DB9E for ; Thu, 28 May 2020 14:21:09 +0200 (CEST) IronPort-SDR: P0qeWfVqc7pNBbnMW9HgqXYDB10aEFv7anAcKrOarnKWHZ3x7AVbluZBnnHUU7AvnaNvxSIlAI A3b8PD3RL5jg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 05:21:08 -0700 IronPort-SDR: dQz5p8tuM5uWh5lcc6IPxZAjb1nUX6JlkTXfcu0VyYiGMxKLXhOi9DKVXJdo0G8qJ5zUnqgjM2 5JT4FVD/FhdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="376352605" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.45.206]) ([10.252.45.206]) by fmsmga001.fm.intel.com with ESMTP; 28 May 2020 05:21:07 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman References: <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-6-dmitry.kozliuk@gmail.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 28 May 2020 13:21:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200525003720.6410-6-dmitry.kozliuk@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 05/11] eal/mem: extract common code for dynamic memory allocation 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 25-May-20 1:37 AM, Dmitry Kozlyuk wrote: > Code in Linux EAL that supports dynamic memory allocation (as opposed to > static allocation used by FreeBSD) is not OS-dependent and can be reused > by Windows EAL. Move such code to a file compiled only for the OS that > require it. > > Signed-off-by: Dmitry Kozlyuk > --- I believe you forgot to add dynmem to Makefile. > +eal_dynmem_calc_num_pages_per_socket( > + uint64_t *memory, struct hugepage_info *hp_info, > + struct hugepage_info *hp_used, unsigned int num_hp_info) > +{ > + unsigned int socket, j, i = 0; > + unsigned int requested, available; > + int total_num_pages = 0; > + uint64_t remaining_mem, cur_mem; > + uint64_t total_mem = internal_config.memory; > + > + if (num_hp_info == 0) > + return -1; > + > + /* if specific memory amounts per socket weren't requested */ > + if (internal_config.force_sockets == 0) { > + size_t total_size; > + int cpu_per_socket[RTE_MAX_NUMA_NODES]; > + size_t default_size; > + unsigned int lcore_id; Comparing code from eal_memory.c and this one, it seems like you've dropped all 32-bit code from this function. Is that intentional? -- Thanks, Anatoly