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 41B1BA0577; Wed, 15 Apr 2020 08:29:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 930341C2FB; Wed, 15 Apr 2020 08:29:21 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 487AC1C2E9 for ; Wed, 15 Apr 2020 08:29:20 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200415062919euoutp02e868b7c487238b4541c496a4978674fc~F6mQsdhX21717917179euoutp02W for ; Wed, 15 Apr 2020 06:29:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200415062919euoutp02e868b7c487238b4541c496a4978674fc~F6mQsdhX21717917179euoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586932159; bh=SvwGP3n9ui0hyoDkis1lyju6FqR8y0Ys1bIyIRWOoRQ=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=H5wCZpzEOEbUFsyZruEo9vxe7Jquj306LWNl9ukDmGXjvaW1wGqOckkk6iZqOFSsg X8k+ZeLE+r47TlSqAskmoCtYAtrD0OvvDmzeo5h5rJoBKpFEjd6IZgiT2Fiu6VI15q HJFG5rTyXB70mUaX70RLR30on93D3k5edJVJu084= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200415062919eucas1p2fd49fa927f67206fe0aeb3225abadb8e~F6mQfzpT30451104511eucas1p2g; Wed, 15 Apr 2020 06:29:19 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 4C.CC.60698.FB9A69E5; Wed, 15 Apr 2020 07:29:19 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200415062919eucas1p1e2c2a543262cb43e5f2a726e3f8477de~F6mQGcEwD3050830508eucas1p1E; Wed, 15 Apr 2020 06:29:19 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200415062919eusmtrp2c42c397893a1a0d6b5077de30f0cddf6~F6mQF1e3x0389703897eusmtrp2G; Wed, 15 Apr 2020 06:29:19 +0000 (GMT) X-AuditID: cbfec7f5-a29ff7000001ed1a-1c-5e96a9bfb272 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 66.CF.08375.EB9A69E5; Wed, 15 Apr 2020 07:29:18 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200415062918eusmtip2dc3678be2b01b17db8fa79e6078d41c6~F6mPZuJAu0505505055eusmtip29; Wed, 15 Apr 2020 06:29:18 +0000 (GMT) To: Bruce Richardson , dev@dpdk.org Cc: ashish.gupta@caviumnetworks.com, tallurix.chaitanya.babu@intel.com, naga.sureshx.somarowthu@intel.com, pablo.de.lara.guarch@intel.com, stable@dpdk.org From: Lukasz Wojciechowski Message-ID: Date: Wed, 15 Apr 2020 08:29:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200410172756.20721-1-bruce.richardson@intel.com> Content-Transfer-Encoding: 8bit Content-Language: pl X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAKsWRmVeSWpSXmKPExsWy7djP87r7V06LM9h9WczizZJlTBY3Vtlb vPu0ncliXVMjm8XRhduYLf51/GG36H25kN2B3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+t Y29gfKDWxcjJISFgIjH17S6WLkYuDiGBpYwSfRe2MXYxcgAlZCQ+XBKAqBGW+HOtiw2i5jWj xIeNW9hAaoQFIiVuf0wGqRERsJe4vvsYO0gNs8A8Rokp86cwQTRMZpSY8+YCG0gVm4CtxJGZ X1lBbF4BN4lnU2YwgtgsAqoS27o+gw0VFYiVaLmoCVEiKHFy5hMWEJtTwEFi4bHpYOXMAmYS 8zY/ZIaw5SWat86GskUkbjxqYZzAKDQLSfssJC2zkLTMQtKygJFlFaNIamlxbnpusaFecWJu cWleul5yfu4mRmB8bTv2c/MOxksbgw8xCnAwKvHwnlgzNU6INbGsuDL3EKMEB7OSCO/6XKAQ b0piZVVqUX58UWlOavEhRlOg3yYyS4km5wNjP68k3tDU0NzC0tDc2NzYzEJJnLdD4GCMkEB6 YklqdmpqQWoRTB8TB6dUA6NNZfc315fa+XfvT78bJhm6PbndNoirYv7bVhHdQ+KKmv2v91wK m98c4Omz2sS1YZPKRUNV8YX8bI/5d9SGp1ct2+smriK5b7Lz7/mGfxZtWCV8cH/J5FBu/XmS j7Zv+cjsG3vaksVrqdpSm+juNY2tvs4KOncU9gebPvMWWGmzqrbLl2tuvRJLcUaioRZzUXEi AMNRHt3FAgAA X-CMS-MailID: 20200415062919eucas1p1e2c2a543262cb43e5f2a726e3f8477de X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200410173223eucas1p270fdaa5dc11d4516514b5317dd331958 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200410173223eucas1p270fdaa5dc11d4516514b5317dd331958 References: <20200410172756.20721-1-bruce.richardson@intel.com> Subject: Re: [dpdk-dev] [PATCH] drivers: fix gcc 10 errors due to logtype var in header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" W dniu 10.04.2020 o 19:27, Bruce Richardson pisze: > 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") > Cc: ashish.gupta@caviumnetworks.com > Fixes: 90c8a2d02a31 ("crypto/aesni_gcm: add dynamic logging") > Cc: tallurix.chaitanya.babu@intel.com > Fixes: 276624ae2ef6 ("crypto/aesni_mb: add dynamic logging") > Fixes: 094b2386f461 ("crypto/openssl: add dynamic logging") > Cc: naga.sureshx.somarowthu@intel.com > Cc: pablo.de.lara.guarch@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- > 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 19f9200c2..e39be2ed8 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 bda49759d..e36c5dc61 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 a1caab993..475d523ae 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; > > /* setup session handlers */ > diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h > index 080d4f7e4..2763d1c49 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 3456693c2..b3cb2f1cf 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 33f416745..40feae3c6 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 43ac3813d..b2054b375 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 199097bf8..b820f6171 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) Patch looks good. I added myself one more as a follow up, that fixes 4 more drivers. It's up to you if you want to squash them together. Acked-by: Lukasz Wojciechowski -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com