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 46D1FA00C5; Fri, 8 May 2020 01:26:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38A011DAB3; Fri, 8 May 2020 01:26:19 +0200 (CEST) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id A31A41DA82 for ; Fri, 8 May 2020 01:26:18 +0200 (CEST) Received: by mail-lf1-f67.google.com with SMTP id j14so5951252lfg.9 for ; Thu, 07 May 2020 16:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gRsJaDI4yZ3KEJ1prslanxNmXdGQm6IUrcHUoh+VtqM=; b=u66oU8d1m4Q84JsmsQ9chZBM3M76ppZDDQN+sKjKtan+yAW8fAgwC+VzqUlYfxtEln B/ohsASDQ88U5vOUps36A+NcVqSgPkqZg/EqNjx7Krw4AeVPwSJr8+1spWoCNEq1AIaJ Q+Um3adQue9j2FMGLc+oFCbhHMfH2+O0+ppp711eaiVODSwlbyMIHtI5MdpALQUquoE3 TW5rHOUlywKw3/OukWjBWhGaXXwqrFQrCBAB2z9mvyJ3C/kdtRcS3cYYkAH1AE0DjIgd /uQtBi+B+xNMjTPQ/LAMXOFp5B/4TO1+qun7Nj4QbvbkaeU5PiAfacMgEG818SBJdnWd IDJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gRsJaDI4yZ3KEJ1prslanxNmXdGQm6IUrcHUoh+VtqM=; b=HtE6YPW+TU1re/UwiIWmjuMB52baCNnz4jW/5/5q+AcTL6ztD4y2WZfMa1baV0vYew XFG2dwnCXEaNDWu58UbfhSJXM0SRp36NBKuguSwTqZCYJ63Xq9x2XX6hsJaQixfsk8md zL3HnVaMpKYyBdCCD8Y7d5zLr9ZUjyOI5cQu4LslfsJcvhygKS4NZAJzplJVL5hMJ9Lk zfDSLgf/DtqXL8y+qgUBf6R2tSTY9b6vJO2U+QjW6zIYn8XUmq5mY1rSxxVMShmqUdO/ a/Abky7721w9NRHkm1Uhr0Ak9PtsvUFDRq3I5ULEzbinTZDT2DItieqz9LwThFlxYRDR kPfQ== X-Gm-Message-State: AGi0PuYMm7roTWmeGUFYm45DGA0FxMXBxawTmBanQipmiMcRU8x69Tiy PnmQET13GpUtJ03tHsYd4Zo= X-Google-Smtp-Source: APiQypJ5+jPKs0NdDAxXKViBJMFYejqEW8y/8yl+qhkGQ/8GXcHUwJfsXwaHiKge4w9S2cOjz4Su4A== X-Received: by 2002:ac2:46c1:: with SMTP id p1mr9748573lfo.25.1588893978090; Thu, 07 May 2020 16:26:18 -0700 (PDT) Received: from Sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y9sm4183612ljy.31.2020.05.07.16.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 16:26:17 -0700 (PDT) Date: Fri, 8 May 2020 02:26:16 +0300 From: Dmitry Kozlyuk To: talshn@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com, david.marchand@redhat.com, grive@u256.net, ranjit.menon@intel.com, navasile@linux.microsoft.com, anatoly.burakov@intel.com Message-ID: <20200508022616.453219a4@Sovereign> In-Reply-To: <20200507121646.624-2-talshn@mellanox.com> References: <20200507121646.624-1-talshn@mellanox.com> <20200507121646.624-2-talshn@mellanox.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 1/7] eal: move OS common functions to single file 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 2020-05-07 15:16 GMT+0300 talshn@mellanox.com wrote: > From: Tal Shnaiderman > > Move common functions between Unix and Windows to eal_common_config.c. > > Those simple functions are getter functions for IOVA, > configuration, Multi-process. > > Move rte_config and runtime_dir to be defined in a common file. > > Signed-off-by: Tal Shnaiderman > --- [snip] > + > +/* early configuration structure, when memory config is not mmapped */ > +static struct rte_mem_config early_mem_config; > + > +/* Address of global and public configuration */ > +static struct rte_config rte_config = { > + .mem_config = &early_mem_config, > +}; > + This declarations result in numerous -Wunused-variable warnings from all files includeing eal_private.h, and rightfully so, because there must be only one configuration structure in the program. You can use `extern` to declare variables here and then define them non-static, e.g. in eal_common_config.c. > /** > * Get the global configuration structure. > * > diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build > index 9bb234009..83bac5884 100644 > --- a/lib/librte_eal/common/meson.build > +++ b/lib/librte_eal/common/meson.build [snip] -- Dmitry Kozlyuk