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 962CAA2E8C for ; Thu, 5 Sep 2019 16:54:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2C7F1EFF4; Thu, 5 Sep 2019 16:53:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 6D3F41EF61; Thu, 5 Sep 2019 16:53:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 07:53:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,470,1559545200"; d="scan'208";a="182846351" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.223.78]) by fmsmga008.fm.intel.com with ESMTP; 05 Sep 2019 07:53:24 -0700 From: Ferruh Yigit To: Anoob Joseph Cc: dev@dpdk.org, stable@dpdk.org Date: Thu, 5 Sep 2019 15:53:09 +0100 Message-Id: <20190905145315.19395-5-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190905145315.19395-1-ferruh.yigit@intel.com> References: <20190905145315.19395-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 04/10] crypto/octeontx: fix global variable multiple definitions 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" 'cpt_logtype' & 'otx_cryptodev_driver_id' global variables are defined in a header file which was causing multiple definitions of the variables, fixed it by moving them to the .c file. Issue has been detected by '-fno-common' gcc flag. Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- drivers/common/cpt/cpt_pmd_logs.h | 2 +- drivers/crypto/octeontx/otx_cryptodev.c | 2 ++ drivers/crypto/octeontx/otx_cryptodev.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h index 4cbec4e36..2681d1286 100644 --- a/drivers/common/cpt/cpt_pmd_logs.h +++ b/drivers/common/cpt/cpt_pmd_logs.h @@ -45,6 +45,6 @@ * cpt_logtype will be used for common logging. This field would be initialized * by otx_* driver routines during PCI probe. */ -int cpt_logtype; +extern int cpt_logtype; #endif /* _CPT_PMD_LOGS_H_ */ diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c index fc64a5f30..604dc2cdb 100644 --- a/drivers/crypto/octeontx/otx_cryptodev.c +++ b/drivers/crypto/octeontx/otx_cryptodev.c @@ -16,6 +16,8 @@ #include "otx_cryptodev_ops.h" static int otx_cryptodev_logtype; +int cpt_logtype; +uint8_t otx_cryptodev_driver_id; static struct rte_pci_id pci_id_cpt_table[] = { { diff --git a/drivers/crypto/octeontx/otx_cryptodev.h b/drivers/crypto/octeontx/otx_cryptodev.h index 6c2871d71..0b204320a 100644 --- a/drivers/crypto/octeontx/otx_cryptodev.h +++ b/drivers/crypto/octeontx/otx_cryptodev.h @@ -15,6 +15,6 @@ /* * Crypto device driver ID */ -uint8_t otx_cryptodev_driver_id; +extern uint8_t otx_cryptodev_driver_id; #endif /* _OTX_CRYPTODEV_H_ */ -- 2.21.0