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 98FCFA0577; Wed, 15 Apr 2020 08:22:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 37CDD1C2E7; Wed, 15 Apr 2020 08:22:50 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 298A21C2BB for ; Wed, 15 Apr 2020 08:22:49 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200415062248euoutp02e58dc423e9deafa63fe8ea07983c5eb8~F6gkb4jjI1389113891euoutp026 for ; Wed, 15 Apr 2020 06:22:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200415062248euoutp02e58dc423e9deafa63fe8ea07983c5eb8~F6gkb4jjI1389113891euoutp026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586931768; bh=SA3q2U6yexdXgBSZPTSdivZl7oUM6zWIccncIfhtH+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eXhjJyaD8PH7y6QiBp0H344v6lrKukx5xY9MYh0fk0W/V8llOCOuNZhINJmESinCW 7aV2XpReVe+cTBsz7DlUoKyck6T4AwBMWOGfl/g+TQcZC4U0TFK2t4zaRUL+Xrf8Jp w7SQO931+NXlPV1lyWFysAbAO0Gu0snuTA7fEK5A= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200415062248eucas1p23334a27051d2c4790b5192fd29398cf1~F6gkGnyJO0806708067eucas1p2l; Wed, 15 Apr 2020 06:22:48 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 52.DF.60679.838A69E5; Wed, 15 Apr 2020 07:22:48 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200415062247eucas1p2819f2f9045a51287706d3fced5362f9e~F6gjfZJMj0806708067eucas1p2k; Wed, 15 Apr 2020 06:22:47 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200415062247eusmtrp100af68fb2e925dc5b3e998096f598af2~F6gjetoBE2539525395eusmtrp1R; Wed, 15 Apr 2020 06:22:47 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-f2-5e96a83852c8 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id BF.3F.08375.738A69E5; Wed, 15 Apr 2020 07:22:47 +0100 (BST) Received: from localhost.localdomain (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200415062246eusmtip10a7104c049d6499b32a21bb6c04b1509~F6gijQ8rl0412004120eusmtip1c; Wed, 15 Apr 2020 06:22:46 +0000 (GMT) From: Lukasz Wojciechowski To: Pablo de Lara , Tomasz Duszynski , Michael Shamis , Liron Himi , Reshma Pattan , Naga Suresh Somarowthu , Agalya Babu RadhaKrishnan , Slawomir Mrozowicz , Declan Doherty Cc: dev@dpdk.org, bruce.richardson@intel.com, stable@dpdk.org Date: Wed, 15 Apr 2020 08:22:16 +0200 Message-Id: <20200415062216.22220-1-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410172756.20721-1-bruce.richardson@intel.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduzneV2LFdPiDB7uY7W4eXc2u8WNVfYW bx40sVi8+7SdyWLFfimLG11RFuuaGtksji7cxmyx/MsMFovvD3pZLP51/GG3WHivh8m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2MHBwSAiYSq6YkdzFycQgJLGWU WNz9mR0iLiPx4ZJAFyMnkCks8edaFxtEzUdGidV3bzCDJNgEbCWOzPzKCpIQEdjGLPHlz2s2 kASzgKPEynW/2UFsYQF3ibnPlzGB2CwCqhJP+1+DxXkFXCV6fy1hgdggL7F6wwGwoZwCDhIL j01nBLGFBOwlpp6ewjKBkW8BI8MqRpHU0uLc9NxiQ73ixNzi0rx0veT83E2MwKDeduzn5h2M lzYGH2IU4GBU4uE9sWZqnBBrYllxZe4hRgkOZiUR3vW5QCHelMTKqtSi/Pii0pzU4kOMpkBH TWSWEk3OB0ZcXkm8oamhuYWlobmxubGZhZI4b4fAwRghgfTEktTs1NSC1CKYPiYOTqkGRpE7 x2NmTvLK6b/d//T6ggn3+56p7ohZZ+1fqxNb0rDOS6gktf2XUBdLV/zCb08OX13lyuklXKnz wKU1tMncZZdwXvXbf3tiTz7KPObX32patTtz/tclO9dFLvs0g1FS0/VJjozVu58b8v5+5VJY c/HBxq9n/p32nORrInNgedeHxMnKmeJrGZRYijMSDbWYi4oTAT1cYcWAAgAA X-CMS-MailID: 20200415062247eucas1p2819f2f9045a51287706d3fced5362f9e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415062247eucas1p2819f2f9045a51287706d3fced5362f9e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415062247eucas1p2819f2f9045a51287706d3fced5362f9e References: <20200410172756.20721-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH] drivers/crypto: move logtype variables to source files 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" The four crypto drivers: kasumi, mvsam, snow3g and zuc define logtype variables in their header file. As the header files are included in more than one compilation unit, it might cause appearance of multiple instances of the variable and a linker error. Such situation can occur, when no common section is allowed by the compiler settings and tentative definitions are placed in BSS section. Fixes: 2cba3814932e ("crypto/kasumi: add dynamic logging") Cc: naga.sureshx.somarowthu@intel.com Fixes: a05a450f42fd ("crypto/mvsam: add dynamic logging") Cc: tdu@semihalf.com Fixes: f3af5f9d1325 ("crypto/zuc: add dynamic logging") Cc: agalyax.babu.radhakrishnan@intel.com Fixes: a3277ad47feb ("cryptodev: remove crypto device driver name") Cc: slawomirx.mrozowicz@intel.com Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski --- drivers/crypto/kasumi/kasumi_pmd_private.h | 2 +- drivers/crypto/kasumi/rte_kasumi_pmd.c | 1 + drivers/crypto/mvsam/mrvl_pmd_private.h | 2 +- drivers/crypto/mvsam/rte_mrvl_pmd.c | 1 + drivers/crypto/snow3g/rte_snow3g_pmd.c | 1 + drivers/crypto/snow3g/snow3g_pmd_private.h | 2 +- drivers/crypto/zuc/rte_zuc_pmd.c | 1 + drivers/crypto/zuc/zuc_pmd_private.h | 4 ++-- 8 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h index 3b3a6958f..b7f1c428b 100644 --- a/drivers/crypto/kasumi/kasumi_pmd_private.h +++ b/drivers/crypto/kasumi/kasumi_pmd_private.h @@ -11,7 +11,7 @@ /**< KASUMI PMD device name */ /** KASUMI PMD LOGTYPE DRIVER */ -int kasumi_logtype_driver; +extern int kasumi_logtype_driver; #define KASUMI_LOG(level, fmt, ...) \ rte_log(RTE_LOG_ ## level, kasumi_logtype_driver, \ diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index baad5b4e7..d67264842 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -17,6 +17,7 @@ #define KASUMI_MAX_BURST 4 #define BYTE_LEN 8 +int kasumi_logtype_driver; static uint8_t cryptodev_driver_id; /** Get xform chain order. */ diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h index 09702b9e3..e575330ef 100644 --- a/drivers/crypto/mvsam/mrvl_pmd_private.h +++ b/drivers/crypto/mvsam/mrvl_pmd_private.h @@ -13,7 +13,7 @@ /**< Marvell PMD device name */ /** MRVL PMD LOGTYPE DRIVER */ -int mrvl_logtype_driver; +extern int mrvl_logtype_driver; #define MRVL_LOG(level, fmt, ...) \ rte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \ diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index 3c0fe216f..63782ce97 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -19,6 +19,7 @@ #define MRVL_PMD_MAX_NB_SESS_ARG ("max_nb_sessions") #define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS 2048 +int mrvl_logtype_driver; static uint8_t cryptodev_driver_id; struct mrvl_pmd_init_params { diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index d72112b5f..8101eaaad 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -16,6 +16,7 @@ #define SNOW3G_MAX_BURST 8 #define BYTE_LEN 8 +int snow3g_logtype_driver; static uint8_t cryptodev_driver_id; /** Get xform chain order. */ diff --git a/drivers/crypto/snow3g/snow3g_pmd_private.h b/drivers/crypto/snow3g/snow3g_pmd_private.h index 2074f3d17..23cf078a9 100644 --- a/drivers/crypto/snow3g/snow3g_pmd_private.h +++ b/drivers/crypto/snow3g/snow3g_pmd_private.h @@ -11,7 +11,7 @@ /**< SNOW 3G PMD device name */ /** SNOW 3G PMD LOGTYPE DRIVER */ -int snow3g_logtype_driver; +extern int snow3g_logtype_driver; #define SNOW3G_LOG(level, fmt, ...) \ rte_log(RTE_LOG_ ## level, snow3g_logtype_driver, \ diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 9e06ab7c9..f47a7880d 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -14,6 +14,7 @@ #define ZUC_MAX_BURST 16 #define BYTE_LEN 8 +int zuc_logtype_driver; static uint8_t cryptodev_driver_id; /** Get xform chain order. */ diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h index 47a8b08dd..d8684891e 100644 --- a/drivers/crypto/zuc/zuc_pmd_private.h +++ b/drivers/crypto/zuc/zuc_pmd_private.h @@ -8,10 +8,10 @@ #include #define CRYPTODEV_NAME_ZUC_PMD crypto_zuc -/**< KASUMI PMD device name */ +/**< ZUC PMD device name */ /** ZUC PMD LOGTYPE DRIVER */ -int zuc_logtype_driver; +extern int zuc_logtype_driver; #define ZUC_LOG(level, fmt, ...) \ rte_log(RTE_LOG_ ## level, zuc_logtype_driver, \ "%s()... line %u: " fmt "\n", __func__, __LINE__, \ -- 2.17.1