patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes
@ 2020-06-16 15:17 Kevin Traynor
  2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 1/2] examples/vm_power: fix build with -fno-common Kevin Traynor
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-16 15:17 UTC (permalink / raw)
  To: stable; +Cc: david.hunt, reshma.pattan, thomas, Kevin Traynor

Couple of vm power example app build fixes. One is a backport
from master for gcc 10, the other is fixing a previous backport
that broke the build.


Kevin Traynor (1):
  examples/vm_power: fix build because of missing include

Thomas Monjalon (1):
  examples/vm_power: fix build with -fno-common

 examples/vm_power_manager/channel_manager.c | 2 ++
 examples/vm_power_manager/channel_manager.h | 2 +-
 examples/vm_power_manager/channel_monitor.c | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.21.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH 18.11 1/2] examples/vm_power: fix build with -fno-common
  2020-06-16 15:17 [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Kevin Traynor
@ 2020-06-16 15:17 ` Kevin Traynor
  2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 2/2] examples/vm_power: fix build because of missing include Kevin Traynor
  2020-06-17  9:16 ` [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Luca Boccassi
  2 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-16 15:17 UTC (permalink / raw)
  To: stable; +Cc: david.hunt, reshma.pattan, thomas, David Marchand, Kevin Traynor

From: Thomas Monjalon <thomas@monjalon.net>

[ 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@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@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 8aabd69c40..c53ad4bf1b 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -37,4 +37,6 @@
 		if ((mask_u64b >> i) & 1) \
 
+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 22905266f8..3c48d6ae66 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -44,5 +44,5 @@ struct libvirt_vm_info {
 };
 
-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,
-- 
2.21.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH 18.11 2/2] examples/vm_power: fix build because of missing include
  2020-06-16 15:17 [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Kevin Traynor
  2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 1/2] examples/vm_power: fix build with -fno-common Kevin Traynor
@ 2020-06-16 15:17 ` Kevin Traynor
  2020-06-17  9:16 ` [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Luca Boccassi
  2 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-16 15:17 UTC (permalink / raw)
  To: stable; +Cc: david.hunt, reshma.pattan, thomas, Kevin Traynor

strlcpy() was used but the file was not including the
rte_string_fns.h header file.

Include the missing header file.

Fixes: d9219a9cac0f ("examples/power: fix string overflow")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 examples/vm_power_manager/channel_monitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 1d6d7ec6d5..7881c51885 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -31,4 +31,5 @@
 #include <rte_pmd_i40e.h>
 #endif
+#include <rte_string_fns.h>
 
 #include <libvirt/libvirt.h>
-- 
2.21.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes
  2020-06-16 15:17 [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Kevin Traynor
  2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 1/2] examples/vm_power: fix build with -fno-common Kevin Traynor
  2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 2/2] examples/vm_power: fix build because of missing include Kevin Traynor
@ 2020-06-17  9:16 ` Luca Boccassi
  2020-06-19  9:38   ` Kevin Traynor
  2 siblings, 1 reply; 5+ messages in thread
From: Luca Boccassi @ 2020-06-17  9:16 UTC (permalink / raw)
  To: Kevin Traynor, stable; +Cc: david.hunt, reshma.pattan, thomas

On Tue, 2020-06-16 at 16:17 +0100, Kevin Traynor wrote:
> Couple of vm power example app build fixes. One is a backport
> from master for gcc 10, the other is fixing a previous backport
> that broke the build.
> 
> 
> Kevin Traynor (1):
>   examples/vm_power: fix build because of missing include
> 
> Thomas Monjalon (1):
>   examples/vm_power: fix build with -fno-common
> 
>  examples/vm_power_manager/channel_manager.c | 2 ++
>  examples/vm_power_manager/channel_manager.h | 2 +-
>  examples/vm_power_manager/channel_monitor.c | 1 +
>  3 files changed, 4 insertions(+), 1 deletion(-)

Series-Acked-By: Luca Boccassi <bluca@debian.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes
  2020-06-17  9:16 ` [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Luca Boccassi
@ 2020-06-19  9:38   ` Kevin Traynor
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-19  9:38 UTC (permalink / raw)
  To: Luca Boccassi, stable; +Cc: david.hunt, reshma.pattan, thomas

On 17/06/2020 10:16, Luca Boccassi wrote:
> On Tue, 2020-06-16 at 16:17 +0100, Kevin Traynor wrote:
>> Couple of vm power example app build fixes. One is a backport
>> from master for gcc 10, the other is fixing a previous backport
>> that broke the build.
>>
>>
>> Kevin Traynor (1):
>>   examples/vm_power: fix build because of missing include
>>
>> Thomas Monjalon (1):
>>   examples/vm_power: fix build with -fno-common
>>
>>  examples/vm_power_manager/channel_manager.c | 2 ++
>>  examples/vm_power_manager/channel_manager.h | 2 +-
>>  examples/vm_power_manager/channel_monitor.c | 1 +
>>  3 files changed, 4 insertions(+), 1 deletion(-)
> 
> Series-Acked-By: Luca Boccassi <bluca@debian.org>
> 

Applied, thanks


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-19  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 15:17 [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Kevin Traynor
2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 1/2] examples/vm_power: fix build with -fno-common Kevin Traynor
2020-06-16 15:17 ` [dpdk-stable] [PATCH 18.11 2/2] examples/vm_power: fix build because of missing include Kevin Traynor
2020-06-17  9:16 ` [dpdk-stable] [PATCH 18.11 0/2] vm power example build fixes Luca Boccassi
2020-06-19  9:38   ` Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).