[dpdk-stable] patch 'examples/vm_power: drop Unix path limit redefinition' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 27 11:24:06 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 121f7527868fca5a3e2788a1f3a79ffa9920a136 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 20 May 2020 10:10:50 +0200
Subject: [PATCH] examples/vm_power: drop Unix path limit redefinition

[ upstream commit 666272d20da3deb1fb41051b9f91a46a8363f2b0 ]

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un.h.

This constant was re-defined locally, based on a variable declaration.
It is breaking compilation with -fno-common (default in GCC 10)
We could avoid the variable declaration by using NULL struct,
but it looks simpler not redefining this system constant.

As the power library and its examples are restricted to Linux only,
the Linux header file is directly included.

Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")

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 | 1 -
 examples/vm_power_manager/channel_manager.h | 7 +------
 examples/vm_power_manager/power_manager.c   | 1 -
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 4d13697208..74a2a677e8 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -4,7 +4,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <inttypes.h>
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index a2a2f2bba0..e55376fcdb 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -10,7 +10,7 @@ extern "C" {
 #endif
 
 #include <linux/limits.h>
-#include <sys/un.h>
+#include <linux/un.h>
 #include <rte_atomic.h>
 #include <stdbool.h>
 
@@ -26,11 +26,6 @@ extern "C" {
 /* FIFO file name template */
 #define CHANNEL_MGR_FIFO_PATTERN_NAME   "fifo"
 
-#ifndef UNIX_PATH_MAX
-struct sockaddr_un _sockaddr_un;
-#define UNIX_PATH_MAX sizeof(_sockaddr_un.sun_path)
-#endif
-
 #define MAX_CLIENTS 64
 #define MAX_VCPUS 20
 
diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c
index 7b4f4b3c4d..cd51d4741f 100644
--- a/examples/vm_power_manager/power_manager.c
+++ b/examples/vm_power_manager/power_manager.c
@@ -6,7 +6,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <inttypes.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <dirent.h>
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.756323216 +0100
+++ 0003-examples-vm_power-drop-Unix-path-limit-redefinition.patch	2020-05-27 10:23:31.623933682 +0100
@@ -1,8 +1,10 @@
-From 666272d20da3deb1fb41051b9f91a46a8363f2b0 Mon Sep 17 00:00:00 2001
+From 121f7527868fca5a3e2788a1f3a79ffa9920a136 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas at monjalon.net>
 Date: Wed, 20 May 2020 10:10:50 +0200
 Subject: [PATCH] examples/vm_power: drop Unix path limit redefinition
 
+[ upstream commit 666272d20da3deb1fb41051b9f91a46a8363f2b0 ]
+
 The Unix socket path may be as long as UNIX_PATH_MAX.
 This constant is supposed to be defined in sys/un.h.
 On Linux, it appears to be in linux/un.h.
@@ -16,7 +18,6 @@
 the Linux header file is directly included.
 
 Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")
-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