[dpdk-stable] patch 'drivers: fix log type variables for -fno-common' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:54:25 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/21/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 efd0dea9c869db269a5f44910598fe286c5814d5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Fri, 10 Apr 2020 18:27:56 +0100
Subject: [PATCH] drivers: fix log type variables for -fno-common

[ upstream commit 3071d471525443978a2ae7e0d068bc3ffcede80c ]

The zlib compression driver, as well as the aesni-gcm, aesni-mb and openssl
crypto drivers all defined the logtype variable in the header file
directly. This gives errors with gcc 10, due to -fno-common being the
default, so we need to apply the same fix in all cases:
* move the variable definition to a suitable .c file
* mark the forward declaration of the variable in the header as "extern"

Fixes: 0c4e4c16b004 ("compress/zlib: introduce zlib PMD")
Fixes: 90c8a2d02a31 ("crypto/aesni_gcm: add dynamic logging")
Fixes: 276624ae2ef6 ("crypto/aesni_mb: add dynamic logging")
Fixes: 094b2386f461 ("crypto/openssl: add dynamic logging")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
---
 drivers/compress/zlib/zlib_pmd.c                 | 2 ++
 drivers/compress/zlib/zlib_pmd_private.h         | 2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c         | 2 ++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 2 +-
 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h   | 2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c       | 2 ++
 drivers/crypto/openssl/openssl_pmd_private.h     | 2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c         | 1 +
 8 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 19f9200c22..e39be2ed86 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -7,6 +7,8 @@
 
 #include "zlib_pmd_private.h"
 
+int zlib_logtype_driver;
+
 /** Compute next mbuf in the list, assign data buffer and length,
  *  returns 0 if mbuf is NULL
  */
diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h
index bda49759dc..e36c5dc615 100644
--- a/drivers/compress/zlib/zlib_pmd_private.h
+++ b/drivers/compress/zlib/zlib_pmd_private.h
@@ -14,7 +14,7 @@
 
 #define DEF_MEM_LEVEL			8
 
-int zlib_logtype_driver;
+extern int zlib_logtype_driver;
 #define ZLIB_PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
 			__func__, ##args)
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 1a03be31dc..c9c9eb8ca9 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -13,6 +13,8 @@
 
 #include "aesni_gcm_pmd_private.h"
 
+int aesni_gcm_logtype_driver;
+
 static uint8_t cryptodev_driver_id;
 
 /** Parse crypto xform chain and set private session parameters */
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 2039adb533..7347c4769f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -20,7 +20,7 @@
 /**< AES-NI GCM PMD device name */
 
 /** AES-NI GCM PMD  LOGTYPE DRIVER */
-int aesni_gcm_logtype_driver;
+extern int aesni_gcm_logtype_driver;
 #define AESNI_GCM_LOG(level, fmt, ...) \
 	rte_log(RTE_LOG_ ## level, aesni_gcm_logtype_driver,	\
 			"%s() line %u: "fmt "\n", __func__, __LINE__,	\
diff --git a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
index 3456693c25..b3cb2f1cf9 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
@@ -19,7 +19,7 @@ enum aesni_mb_vector_mode {
 /**< AES-NI Multi buffer PMD device name */
 
 /** AESNI_MB PMD LOGTYPE DRIVER */
-int aesni_mb_logtype_driver;
+extern int aesni_mb_logtype_driver;
 
 #define AESNI_MB_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, aesni_mb_logtype_driver,  \
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 33f4167452..40feae3c62 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -14,6 +14,8 @@
 
 #include "aesni_mb_pmd_private.h"
 
+int aesni_mb_logtype_driver;
+
 #define AES_CCM_DIGEST_MIN_LEN 4
 #define AES_CCM_DIGEST_MAX_LEN 16
 #define HMAC_MAX_BLOCK_SIZE 128
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 43ac3813df..b2054b3754 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -16,7 +16,7 @@
 /**< Open SSL Crypto PMD device name */
 
 /** OPENSSL PMD LOGTYPE DRIVER */
-int openssl_logtype_driver;
+extern int openssl_logtype_driver;
 #define OPENSSL_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, openssl_logtype_driver,  \
 			"%s() line %u: " fmt "\n", __func__, __LINE__,  \
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 199097bf8c..b820f6171d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -18,6 +18,7 @@
 
 #define DES_BLOCK_SIZE 8
 
+int openssl_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.848933454 +0100
+++ 0075-drivers-fix-log-type-variables-for-fno-common.patch	2020-05-19 13:56:18.307503404 +0100
@@ -1,8 +1,10 @@
-From 3071d471525443978a2ae7e0d068bc3ffcede80c Mon Sep 17 00:00:00 2001
+From efd0dea9c869db269a5f44910598fe286c5814d5 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson at intel.com>
 Date: Fri, 10 Apr 2020 18:27:56 +0100
 Subject: [PATCH] drivers: fix log type variables for -fno-common
 
+[ upstream commit 3071d471525443978a2ae7e0d068bc3ffcede80c ]
+
 The zlib compression driver, as well as the aesni-gcm, aesni-mb and openssl
 crypto drivers all defined the logtype variable in the header file
 directly. This gives errors with gcc 10, due to -fno-common being the
@@ -14,7 +16,6 @@
 Fixes: 90c8a2d02a31 ("crypto/aesni_gcm: add dynamic logging")
 Fixes: 276624ae2ef6 ("crypto/aesni_mb: add dynamic logging")
 Fixes: 094b2386f461 ("crypto/openssl: add dynamic logging")
-Cc: stable at dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
 Acked-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
@@ -56,7 +57,7 @@
  	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
  			__func__, ##args)
 diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
-index a1caab9939..475d523ae1 100644
+index 1a03be31dc..c9c9eb8ca9 100644
 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 @@ -13,6 +13,8 @@
@@ -67,9 +68,9 @@
 +
  static uint8_t cryptodev_driver_id;
  
- /* setup session handlers */
+ /** Parse crypto xform chain and set private session parameters */
 diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
-index 080d4f7e49..2763d1c492 100644
+index 2039adb533..7347c4769f 100644
 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 @@ -20,7 +20,7 @@


More information about the stable mailing list