[dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 27 11:24:05 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From ba5df75ed5ea04c8e0f357854ba78ce7d4d49ab3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 20 May 2020 09:59:35 +0200
Subject: [PATCH] examples/vm_power: fix build with -fno-common

[ upstream commit 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 ]

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")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: David Marchand <david.marchand at redhat.com>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
---
 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.723733670 +0100
+++ 0002-examples-vm_power-fix-build-with-fno-common.patch	2020-05-27 10:23:31.619933644 +0100
@@ -1,8 +1,10 @@
-From 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 Mon Sep 17 00:00:00 2001
+From ba5df75ed5ea04c8e0f357854ba78ce7d4d49ab3 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas at monjalon.net>
 Date: Wed, 20 May 2020 09:59:35 +0200
 Subject: [PATCH] examples/vm_power: fix build with -fno-common
 
+[ upstream commit 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 ]
+
 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
@@ -12,7 +14,6 @@
 shared as extern to avoid multiple re-definitions.
 
 Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping")
-Cc: stable at dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
 Acked-by: David Marchand <david.marchand at redhat.com>


More information about the stable mailing list