From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1CE7A0093 for ; Thu, 28 May 2020 18:25:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA8F11DC37; Thu, 28 May 2020 18:25:10 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id C73FC1DC2B for ; Thu, 28 May 2020 18:25:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CRumewF9MDKHyIYdNJhMK79sMvnrTV8rQhbxCU4VpFE=; b=cQFSiRBBOBPFGkIUkxVed66/eYjskPyY7C5uK4i/d0UJXl5pM07crcA8vputpzSBcvlcFB bx1ZgoIgsrPPBiv/3NZ+yw5Tjbp4nOnY70wcytbpaLJoz+UtniotDGbLxPj8PGsRGCnyAW CwTFbckWkQaMYJwUgxoHAlbm/BMT+H8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-G9VaBOHEPR2N7_2ewnzgnQ-1; Thu, 28 May 2020 12:25:06 -0400 X-MC-Unique: G9VaBOHEPR2N7_2ewnzgnQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EBA84107ACCA; Thu, 28 May 2020 16:25:04 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id C200560C05; Thu, 28 May 2020 16:25:03 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Lukasz Wojciechowski , dpdk stable Date: Thu, 28 May 2020 17:22:23 +0100 Message-Id: <20200528162322.7863-36-ktraynor@redhat.com> In-Reply-To: <20200528162322.7863-1-ktraynor@redhat.com> References: <20200528162322.7863-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'drivers: fix log type variables for -fno-common' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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/03/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/aa50bd5cf2eb1aa4916a03361128a12a8f0ee03c Thanks. Kevin. --- >From aa50bd5cf2eb1aa4916a03361128a12a8f0ee03c Mon Sep 17 00:00:00 2001 From: Bruce Richardson 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 Acked-by: Lukasz Wojciechowski --- 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/rte_aesni_mb_pmd.c | 2 ++ drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 +- drivers/crypto/openssl/rte_openssl_pmd.c | 1 + drivers/crypto/openssl/rte_openssl_pmd_private.h | 2 +- 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 @@ -8,4 +8,6 @@ #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 2c6e83d45c..05e80d94ef 100644 --- a/drivers/compress/zlib/zlib_pmd_private.h +++ b/drivers/compress/zlib/zlib_pmd_private.h @@ -15,5 +15,5 @@ #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", \ diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index ebdf7c35a8..1975ad09d2 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -14,4 +14,6 @@ #include "aesni_gcm_pmd_private.h" +int aesni_gcm_logtype_driver; + static uint8_t cryptodev_driver_id; diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h index 92b0413547..20a619f1a9 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h @@ -21,5 +21,5 @@ /** 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, \ diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 45dd86a756..19652469e7 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -15,4 +15,6 @@ #include "rte_aesni_mb_pmd_private.h" +int aesni_mb_logtype_driver; + #define AES_CCM_DIGEST_MIN_LEN 4 #define AES_CCM_DIGEST_MAX_LEN 16 diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h index d8021cdaa2..a7a417b6b5 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h @@ -12,5 +12,5 @@ /** AESNI_MB PMD LOGTYPE DRIVER */ -int aesni_mb_logtype_driver; +extern int aesni_mb_logtype_driver; #define AESNI_MB_LOG(level, fmt, ...) \ diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 36122a43ce..7a922f5d2a 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -19,4 +19,5 @@ #define DES_BLOCK_SIZE 8 +int openssl_logtype_driver; static uint8_t cryptodev_driver_id; diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h index a8f2c8482b..2a9302bc19 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h @@ -17,5 +17,5 @@ /** 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, \ -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:13:01.013618789 +0100 +++ 0036-drivers-fix-log-type-variables-for-fno-common.patch 2020-05-28 17:12:59.101556400 +0100 @@ -1 +1 @@ -From 3071d471525443978a2ae7e0d068bc3ffcede80c Mon Sep 17 00:00:00 2001 +From aa50bd5cf2eb1aa4916a03361128a12a8f0ee03c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3071d471525443978a2ae7e0d068bc3ffcede80c ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22,8 +23,8 @@ - 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 + + 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/rte_aesni_mb_pmd.c | 2 ++ + drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 +- + drivers/crypto/openssl/rte_openssl_pmd.c | 1 + + drivers/crypto/openssl/rte_openssl_pmd_private.h | 2 +- @@ -44 +45 @@ -index bda49759dc..e36c5dc615 100644 +index 2c6e83d45c..05e80d94ef 100644 @@ -55 +56 @@ -index a1caab9939..475d523ae1 100644 +index ebdf7c35a8..1975ad09d2 100644 @@ -66 +67 @@ -index 080d4f7e49..2763d1c492 100644 +index 92b0413547..20a619f1a9 100644 @@ -76,11 +76,0 @@ -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 -@@ -20,5 +20,5 @@ enum aesni_mb_vector_mode { - - /** AESNI_MB PMD LOGTYPE DRIVER */ --int aesni_mb_logtype_driver; -+extern int aesni_mb_logtype_driver; - - #define AESNI_MB_LOG(level, fmt, ...) \ @@ -88 +78 @@ -index 33f4167452..40feae3c62 100644 +index 45dd86a756..19652469e7 100644 @@ -92 +82 @@ - #include "aesni_mb_pmd_private.h" + #include "rte_aesni_mb_pmd_private.h" @@ -98,5 +88,5 @@ -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 -@@ -17,5 +17,5 @@ +diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +index d8021cdaa2..a7a417b6b5 100644 +--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h ++++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +@@ -12,5 +12,5 @@ @@ -104,5 +94,5 @@ - /** 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, \ + /** AESNI_MB PMD LOGTYPE DRIVER */ +-int aesni_mb_logtype_driver; ++extern int aesni_mb_logtype_driver; + + #define AESNI_MB_LOG(level, fmt, ...) \ @@ -110 +100 @@ -index 199097bf8c..b820f6171d 100644 +index 36122a43ce..7a922f5d2a 100644 @@ -118,0 +109,11 @@ +diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h +index a8f2c8482b..2a9302bc19 100644 +--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h ++++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h +@@ -17,5 +17,5 @@ + + /** 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, \