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 5461AA04B8; Tue, 5 May 2020 18:24:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD43A1D654; Tue, 5 May 2020 18:24:27 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id CE0C51D653 for ; Tue, 5 May 2020 18:24:26 +0200 (CEST) IronPort-SDR: e7Ww0Eka4lVaTScCe8T0rOmJmPV+jTjCaRDXCltUNh+pZq4W1vm4S9vRiZmWkGqjwgjIp1EJDe sF0UQRdwxGKA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 09:24:25 -0700 IronPort-SDR: 5YiA6o0P/vVN8EdT8SVtGi8NYuNaHvtduNMwajlIksRbUO7uZ31IypH/yC0GqWQb08PUZ3uWNP R+WsQ0BH0GNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,356,1583222400"; d="scan'208";a="304522442" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.197.31]) ([10.213.197.31]) by FMSMGA003.fm.intel.com with ESMTP; 05 May 2020 09:24:22 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: "Dmitry Malloy (MESHCHANINOV)" , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Thomas Monjalon , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon , John McNamara , Marko Kovacevic References: <20200410164342.1194634-1-dmitry.kozliuk@gmail.com> <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> <20200428235015.2820677-9-dmitry.kozliuk@gmail.com> From: "Burakov, Anatoly" Message-ID: <41f2a43d-2c22-f408-f21f-64932e4d5bb8@intel.com> Date: Tue, 5 May 2020 17:24:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200428235015.2820677-9-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 v4 8/8] eal/windows: implement basic memory management 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 29-Apr-20 12:50 AM, Dmitry Kozlyuk wrote: > Basic memory management supports core libraries and PMDs operating in > IOVA as PA mode. It uses a kernel-mode driver, virt2phys, to obtain > IOVAs of hugepages allocated from user-mode. Multi-process mode is not > implemented and is forcefully disabled at startup. > > Signed-off-by: Dmitry Kozlyuk > --- Lots of duplication... I wonder if it would be possible to share at least some of this code in common. Tracking down bugs because of duplicated code desync is always a pain... > diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c > index 7c21aa921..9fa7bf352 100644 > --- a/lib/librte_eal/common/eal_common_memzone.c > +++ b/lib/librte_eal/common/eal_common_memzone.c > @@ -19,7 +19,14 @@ > #include > #include > #include > + > +#ifndef RTE_EXEC_ENV_WINDOWS > #include > +#else > +#define rte_eal_trace_memzone_reserve(...) > +#define rte_eal_trace_memzone_lookup(...) > +#define rte_eal_trace_memzone_free(...) > +#endif > Is it possible for rte_eal_trace.h to implement this workaround instead? It wouldn't be very wise to have to have this in each file that depends on rte_eal_trace.h. > #include "malloc_heap.h" > #include "malloc_elem.h" > diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build > index 155da29b4..9bb234009 100644 > --- a/lib/librte_eal/common/meson.build > +++ b/lib/librte_eal/common/meson.build > @@ -9,11 +9,21 @@ if is_windows > 'eal_common_class.c', > 'eal_common_devargs.c', > 'eal_common_errno.c', > /* Launch threads, called at application init(). */ > int > rte_eal_init(int argc, char **argv) > @@ -245,6 +346,13 @@ rte_eal_init(int argc, char **argv) > if (fctret < 0) > exit(1); > > + /* Prevent creation of shared memory files. */ > + if (internal_config.no_shconf == 0) { > + RTE_LOG(WARNING, EAL, "Multi-process support is requested, " > + "but not available.\n"); > + internal_config.no_shconf = 1; In the future i would like to deprecate no_shconf because it's a strict subset of in_memory mode and serves the same purpose. Might i suggest using in_memory flag instead? IIRC no_shconf is automatically set when you set in_memory mode. -- Thanks, Anatoly