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 6522BA0093; Wed, 20 May 2020 15:59:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 976121D62D; Wed, 20 May 2020 15:58:54 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 68A0A1C24A; Wed, 20 May 2020 15:58:52 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 2744C1217; Wed, 20 May 2020 09:58:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 20 May 2020 09:58:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=jDLL8Jq6SQ9Fa hHCMvMEEu18FxJIAUjEbdt2CXYN3gY=; b=NKGM7Xq7GY2lA6SbuQDro1FnvPUHE TNv1InB/fzev8r3IsVwmQMKFk966M7nYwQzzGLGp1SYyPGs4Olmu4jgh7ZqPV29x wMCODXVHpkd4KEp3NtUf09sa1jBZuvxK0KTnctmj0ywY7n9vXz5U3tpr7D9BtMhN +jGX7czE1xhTWI2pwnSzIJzO4np0vwheiQLDqkCdk7t7PxOGFDO+GSzBDiNE8rWT zet5rjoOFFhoQ+NFU52+vbXoqpP/HgQ5Ua6N0l/cj79U7C7o3RPq7GXpS0r/d2rf O91hVFSXBc7j4eF44/56rRNmNw2Fz3YGy2vgS/kWU4vm4fQ2El+HRZvCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=jDLL8Jq6SQ9FahHCMvMEEu18FxJIAUjEbdt2CXYN3gY=; b=axojudV8 JJa48Jh23aylw4WWHHj6vyMZckD2p1aUyQq55hkCv3m/SfXSRf8KnJKCrnZj++SF sysDOYXt8GHG7/FOoaoZPnWSBJVbxqaTRcDwymhHnA3ctIquzohYuY8Gf14oOwC0 D22IWgrjpYATbAAzIeg8aLDh5SSUYTDSUvObTsq5xV8gBCgufBE9y4WXQwhXKYdx GRyoAbIFXVN4YuSbj+XEbYYymRwD46P135vx9JH0aX5umCHkKELXhsg0aWChKLCS NRrBdAr+kadaM6515gnSeOXchK+KwBCBayQ83hJvrw3e3WaclBuP4qRv0MWZKd5u oLD2+rTiGf01vw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtledgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 39D143066451; Wed, 20 May 2020 09:58:48 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, stable@dpdk.org, David Hunt , Nemanja Marjanovic , Rory Sexton , Santosh Shukla , Konstantin Ananyev Date: Wed, 20 May 2020 15:58:28 +0200 Message-Id: <20200520135830.1178242-3-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200520135830.1178242-1-thomas@monjalon.net> References: <20200520135830.1178242-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/4] examples/vm_power: fix build with -fno-common 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" The variables of the same name are merged together if compiled with -fcommon. It used to be the default. This default behaviour allows to declare a variable in a header file and share the variable in every .o binaries thanks to merge at link-time. If compiling with -fno-common (default in GCC 10), the variable must be shared as extern to avoid multiple re-definitions. Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- examples/vm_power_manager/channel_manager.c | 2 ++ examples/vm_power_manager/channel_manager.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 4ac21f02c1..4d13697208 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -35,6 +35,8 @@ #define RTE_LOGTYPE_CHANNEL_MANAGER RTE_LOGTYPE_USER1 +struct libvirt_vm_info lvm_info[MAX_CLIENTS]; + /* Global pointer to libvirt connection */ static virConnectPtr global_vir_conn_ptr; diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h index 8284be0a18..a2a2f2bba0 100644 --- a/examples/vm_power_manager/channel_manager.h +++ b/examples/vm_power_manager/channel_manager.h @@ -41,7 +41,7 @@ struct libvirt_vm_info { uint8_t num_cpus; }; -struct libvirt_vm_info lvm_info[MAX_CLIENTS]; +extern struct libvirt_vm_info lvm_info[MAX_CLIENTS]; /* Communication Channel Status */ enum channel_status { CHANNEL_MGR_CHANNEL_DISCONNECTED = 0, CHANNEL_MGR_CHANNEL_CONNECTED, -- 2.26.2