From patchwork Fri Jul 10 21:43:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 73781 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8553CA052A; Fri, 10 Jul 2020 23:43:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A5BB61DB78; Fri, 10 Jul 2020 23:43:52 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F16011DB6C; Fri, 10 Jul 2020 23:43:50 +0200 (CEST) IronPort-SDR: LqPvPZLxEpiN6IGXAr0bmNtVU9VOjb4mjmJpteus+CGvOiGf9r+SY/8v505UiP1a6dXI5Y3ANT rGhkqAwrbFWA== X-IronPort-AV: E=McAfee;i="6000,8403,9678"; a="213173753" X-IronPort-AV: E=Sophos;i="5.75,336,1589266800"; d="scan'208";a="213173753" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2020 14:43:49 -0700 IronPort-SDR: /HCP01vz9pH3lvQEhrIBh0E71QeGjgFefggiuUMOMMAP7nOvPVvIwLPPPUipo9XLa9wXVbWZgH BzG/GGFSlwQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,336,1589266800"; d="scan'208";a="458406642" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga005.jf.intel.com with ESMTP; 10 Jul 2020 14:43:46 -0700 From: Ferruh Yigit To: Igor Russkikh , Pavel Belous , Ajit Khaparde , Somnath Kotur , Hemant Agrawal , Sachin Saxena , Beilei Xing , Jeff Guo , Wei Zhao , Andrew Rybchenko , Thomas Monjalon , Shreyansh Jain Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org, David Marchand Date: Fri, 10 Jul 2020 22:43:41 +0100 Message-Id: <20200710214343.1407419-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200710144208.499544-1-ferruh.yigit@intel.com> References: <20200710144208.499544-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v7 1/3] drivers/net: fix build with internal API usage 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" Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error for applications and examples. Because they don't define 'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error. This patch is preparation for future '__rte_internal' usage. At first place, applications/examples should not include 'rte_ethdev_driver.h', this is happening because of PMD public header files include 'rte_ethdev_driver.h' by mistake. Updated PMD public header files to not include internal header files. But for unit test application, 'app/test', enable accessing internal APIs, since some unit tests need them. Fixes: ffc905f3b856 ("ethdev: separate driver APIs") Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Thomas Monjalon --- Cc: David Marchand --- app/test/meson.build | 3 +++ drivers/net/atlantic/rte_pmd_atlantic.h | 2 +- drivers/net/bnxt/rte_pmd_bnxt.h | 3 ++- drivers/net/dpaa/rte_pmd_dpaa.h | 2 -- drivers/net/i40e/rte_pmd_i40e.h | 4 +++- drivers/net/ixgbe/rte_pmd_ixgbe.h | 4 +++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index e0d33ea5ef..786a213972 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -396,6 +396,9 @@ cflags += '-D_GNU_SOURCE' # Strict-aliasing rules are violated by uint8_t[] to context size casts. cflags += '-fno-strict-aliasing' +# Enable using internal APIs in unit tests +cflags += ['-DALLOW_INTERNAL_API'] + test_dep_objs = [] if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') compress_test_dep = dependency('zlib', required: false) diff --git a/drivers/net/atlantic/rte_pmd_atlantic.h b/drivers/net/atlantic/rte_pmd_atlantic.h index c0208569b6..0100fc16e5 100644 --- a/drivers/net/atlantic/rte_pmd_atlantic.h +++ b/drivers/net/atlantic/rte_pmd_atlantic.h @@ -11,7 +11,7 @@ #ifndef _PMD_ATLANTIC_H_ #define _PMD_ATLANTIC_H_ -#include +#include /** * @warning diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h index 2e893cc7bf..81d0d0e032 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.h +++ b/drivers/net/bnxt/rte_pmd_bnxt.h @@ -6,7 +6,8 @@ #ifndef _PMD_BNXT_H_ #define _PMD_BNXT_H_ -#include +#include +#include /* * Response sent back to the caller after callback diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h index 37eea9b032..8d244bb491 100644 --- a/drivers/net/dpaa/rte_pmd_dpaa.h +++ b/drivers/net/dpaa/rte_pmd_dpaa.h @@ -15,8 +15,6 @@ * */ -#include - /** * Enable/Disable TX loopback * diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h index 0f6715efc8..fc3560c28c 100644 --- a/drivers/net/i40e/rte_pmd_i40e.h +++ b/drivers/net/i40e/rte_pmd_i40e.h @@ -14,7 +14,9 @@ * */ -#include +#include +#include +#include /** * Response sent back to i40e driver from user app after callback diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h index 8b6bb99a58..90fc8160b1 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h @@ -11,7 +11,9 @@ #ifndef _PMD_IXGBE_H_ #define _PMD_IXGBE_H_ -#include +#include +#include +#include /** * Notify VF when PF link status changes.