patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Matan Azrad <matan@mellanox.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'mlx5: fix build with -fno-common' has been queued to LTS release 18.11.9
Date: Tue, 16 Jun 2020 14:33:02 +0100	[thread overview]
Message-ID: <20200616133304.6812-2-ktraynor@redhat.com> (raw)
In-Reply-To: <20200616133304.6812-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/19/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/53a68781004e60d73a56856e5b8334b68769c9d8

Thanks.

Kevin.

---
From 53a68781004e60d73a56856e5b8334b68769c9d8 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 15 Jun 2020 20:36:15 +0100
Subject: [PATCH] mlx5: fix build with -fno-common

[ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ]

The variable storages of the same name are merged together
if compiled with -fcommon. This is 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.

In the case of dlopen linking of the glue library, the pointer mlx5_glue
is referencing the glue functions struct and is set after calling
dlopen.

If compiling with -fno-common (default in GCC 10), the variable must be
declared as extern to avoid multiple re-definitions.
In case the glue layer is split in glue library, the variable mlx5_glue
needs to have its own storage for the rest of the PMD.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c      | 4 ++++
 drivers/net/mlx5/mlx5_glue.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 29370f58f0..649faad319 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -132,4 +132,8 @@ static rte_spinlock_t mlx5_shared_data_lock = RTE_SPINLOCK_INITIALIZER;
 int mlx5_logtype;
 
+#ifdef MLX5_GLUE
+const struct mlx5_glue *mlx5_glue;
+#endif
+
 /**
  * Prepare shared data between primary and secondary process.
diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
index 2d92ba8bcf..0ed754a070 100644
--- a/drivers/net/mlx5/mlx5_glue.h
+++ b/drivers/net/mlx5/mlx5_glue.h
@@ -167,5 +167,5 @@ struct mlx5_glue {
 };
 
-const struct mlx5_glue *mlx5_glue;
+extern const struct mlx5_glue *mlx5_glue;
 
 #endif /* MLX5_GLUE_H_ */
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-16 14:31:16.011171920 +0100
+++ 0002-mlx5-fix-build-with-fno-common.patch	2020-06-16 14:31:15.914226651 +0100
@@ -1 +1 @@
-From 2889d38256906a5cbff717e7e524ec645c89c794 Mon Sep 17 00:00:00 2001
+From 53a68781004e60d73a56856e5b8334b68769c9d8 Mon Sep 17 00:00:00 2001
@@ -3,2 +3,4 @@
-Date: Wed, 8 Apr 2020 02:08:59 +0200
-Subject: [PATCH] common/mlx5: fix build with -fno-common
+Date: Mon, 15 Jun 2020 20:36:15 +0100
+Subject: [PATCH] mlx5: fix build with -fno-common
+
+[ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ]
@@ -20,2 +21,0 @@
-Cc: stable@dpdk.org
-
@@ -25,10 +25,10 @@
- drivers/common/mlx5/mlx5_common.c | 3 +++
- drivers/common/mlx5/mlx5_glue.h   | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
-index d8c01a5d14..42610459f7 100644
---- a/drivers/common/mlx5/mlx5_common.c
-+++ b/drivers/common/mlx5/mlx5_common.c
-@@ -19,4 +19,7 @@
- int mlx5_common_logtype;
+ drivers/net/mlx5/mlx5.c      | 4 ++++
+ drivers/net/mlx5/mlx5_glue.h | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
+index 29370f58f0..649faad319 100644
+--- a/drivers/net/mlx5/mlx5.c
++++ b/drivers/net/mlx5/mlx5.c
+@@ -132,4 +132,8 @@ static rte_spinlock_t mlx5_shared_data_lock = RTE_SPINLOCK_INITIALIZER;
+ int mlx5_logtype;
@@ -39 +39 @@
- 
++
@@ -41,5 +41,6 @@
-diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h
-index cd1136f382..184c41071e 100644
---- a/drivers/common/mlx5/mlx5_glue.h
-+++ b/drivers/common/mlx5/mlx5_glue.h
-@@ -305,5 +305,5 @@ struct mlx5_glue {
+  * Prepare shared data between primary and secondary process.
+diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
+index 2d92ba8bcf..0ed754a070 100644
+--- a/drivers/net/mlx5/mlx5_glue.h
++++ b/drivers/net/mlx5/mlx5_glue.h
+@@ -167,5 +167,5 @@ struct mlx5_glue {


  reply	other threads:[~2020-06-16 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 13:33 [dpdk-stable] patch 'mem: mark pages as not accessed when freeing memory' " Kevin Traynor
2020-06-16 13:33 ` Kevin Traynor [this message]
2020-06-16 13:33 ` [dpdk-stable] patch 'crypto/octeontx: fix build with gcc 10' " Kevin Traynor
2020-06-16 13:33 ` [dpdk-stable] patch 'drivers/crypto: disable gcc 10 fno-common errors' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200616133304.6812-2-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=matan@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).