From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3BD8A00C5; Tue, 15 Feb 2022 18:13:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD71C41145; Tue, 15 Feb 2022 18:13:50 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 05B4C410F3; Tue, 15 Feb 2022 18:13:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644945229; x=1676481229; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KytQUdf7thyjmD9/90qq8ceKWw6wOGwrTRX+gQS//2w=; b=NAFI6yZM/VoRWhf85K1rgIlwj54yCMxkQRbFRoKf/YAR1ugaR7jOj7bI G3+6t1MMxDvo8a5rqq9o2U8a5M9Nt8yw0t5gXd42PouBMnjtt75iWMOMc ZvhhCrZW95D1FahaIb8j3g9Xj8edLqIeJ0X9j8go2Eh0KKM4ZgX4fH/DV qGG6H5s4InUHWw3E6RGOcvr7JvfL2K0TZoWT+wTx0ut2u4K0P/N4VmOS+ K0si4SlpSUi6fvYteEPWtfFpQvddC25r2NA9HQ3f6BHtk7gXweSD/NvUm jmWO8luoCG91gArhKhFWKsD0X2Z1gC34QKqy3z5u05tCUAafWhSPDfRk3 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="336830976" X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="336830976" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 09:08:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="703802200" Received: from silpixa00400883.ir.intel.com ([10.243.23.143]) by orsmga005.jf.intel.com with ESMTP; 15 Feb 2022 09:08:22 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , joyce.kong@arm.com, nhorman@tuxdriver.com, thomas@monjalon.net, anatoly.burakov@intel.com, adrien.mazarguil@6wind.com, jerinj@marvell.com, anand.rawat@intel.com, stable@dpdk.org, Ray Kinsella , Sunil Kumar Kori , Gavin Hu , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Phil Yang , Sergio Gonzalez Monroy , Remy Horton , David Marchand , Harini Ramakrishnan , Pallavi Kadam Subject: [PATCH 01/11] eal: fix missing C++ guards Date: Tue, 15 Feb 2022 17:08:07 +0000 Message-Id: <20220215170817.662136-2-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220215170817.662136-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Some public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards. Fixes: af75078fece3 ("first public release") Fixes: 7f3aa0863903 ("eal: introduce bit operations API") Fixes: 166a743c53fa ("compat: add infrastructure to support symbol versioning") Fixes: 8f40ee0734c8 ("eal/x86: get hypervisor name") Fixes: 75583b0d1efd ("eal: add keep alive monitoring") Fixes: 88701645c98c ("eal: move interrupt type out of igb_uio") Fixes: f04519d8092e ("lib: add missing include dependencies") Fixes: f58880682c81 ("trace: implement register API") Fixes: 428eb983f5f7 ("eal: add OS specific header file") Cc: joyce.kong@arm.com Cc: nhorman@tuxdriver.com Cc: thomas@monjalon.net Cc: anatoly.burakov@intel.com Cc: adrien.mazarguil@6wind.com Cc: jerinj@marvell.com Cc: anand.rawat@intel.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley --- lib/eal/include/rte_bitops.h | 8 ++++++++ lib/eal/include/rte_branch_prediction.h | 8 ++++++++ lib/eal/include/rte_compat.h | 8 ++++++++ lib/eal/include/rte_hypervisor.h | 8 ++++++++ lib/eal/include/rte_keepalive.h | 8 ++++++++ lib/eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++ lib/eal/include/rte_pci_dev_features.h | 8 ++++++++ lib/eal/include/rte_time.h | 8 ++++++++ lib/eal/include/rte_trace_point_register.h | 8 ++++++++ lib/eal/linux/include/rte_os.h | 8 ++++++++ 10 files changed, 80 insertions(+) diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index 141e8ea730..f50dbe4388 100644 --- a/lib/eal/include/rte_bitops.h +++ b/lib/eal/include/rte_bitops.h @@ -17,6 +17,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * Get the uint64_t value for a specified bit set. * @@ -271,4 +275,8 @@ rte_bit_relaxed_test_and_clear64(unsigned int nr, volatile uint64_t *addr) return val & mask; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_BITOPS_H_ */ diff --git a/lib/eal/include/rte_branch_prediction.h b/lib/eal/include/rte_branch_prediction.h index 854ef9e5dd..0256a9de60 100644 --- a/lib/eal/include/rte_branch_prediction.h +++ b/lib/eal/include/rte_branch_prediction.h @@ -10,6 +10,10 @@ #ifndef _RTE_BRANCH_PREDICTION_H_ #define _RTE_BRANCH_PREDICTION_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * Check if a branch is likely to be taken. * @@ -38,4 +42,8 @@ #define unlikely(x) __builtin_expect(!!(x), 0) #endif /* unlikely */ +#ifdef __cplusplus +} +#endif + #endif /* _RTE_BRANCH_PREDICTION_H_ */ diff --git a/lib/eal/include/rte_compat.h b/lib/eal/include/rte_compat.h index 9556bbf4d0..fc9fbaaab2 100644 --- a/lib/eal/include/rte_compat.h +++ b/lib/eal/include/rte_compat.h @@ -6,6 +6,10 @@ #ifndef _RTE_COMPAT_H_ #define _RTE_COMPAT_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifndef ALLOW_EXPERIMENTAL_API #define __rte_experimental \ @@ -46,4 +50,8 @@ __attribute__((section(".text.internal"))) #endif +#ifdef __cplusplus +} +#endif + #endif /* _RTE_COMPAT_H_ */ diff --git a/lib/eal/include/rte_hypervisor.h b/lib/eal/include/rte_hypervisor.h index 5fe719c1d4..1666431ce3 100644 --- a/lib/eal/include/rte_hypervisor.h +++ b/lib/eal/include/rte_hypervisor.h @@ -5,6 +5,10 @@ #ifndef RTE_HYPERVISOR_H #define RTE_HYPERVISOR_H +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * Hypervisor awareness. @@ -30,4 +34,8 @@ rte_hypervisor_get(void); const char * rte_hypervisor_get_name(enum rte_hypervisor id); +#ifdef __cplusplus +} +#endif + #endif /* RTE_HYPERVISOR_H */ diff --git a/lib/eal/include/rte_keepalive.h b/lib/eal/include/rte_keepalive.h index bd25508da8..538fb09095 100644 --- a/lib/eal/include/rte_keepalive.h +++ b/lib/eal/include/rte_keepalive.h @@ -11,6 +11,10 @@ #ifndef _KEEPALIVE_H_ #define _KEEPALIVE_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -139,4 +143,8 @@ rte_keepalive_register_relay_callback(struct rte_keepalive *keepcfg, rte_keepalive_relay_callback_t callback, void *data); +#ifdef __cplusplus +} +#endif + #endif /* _KEEPALIVE_H_ */ diff --git a/lib/eal/include/rte_pci_dev_feature_defs.h b/lib/eal/include/rte_pci_dev_feature_defs.h index e12c22081f..c5bb631286 100644 --- a/lib/eal/include/rte_pci_dev_feature_defs.h +++ b/lib/eal/include/rte_pci_dev_feature_defs.h @@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_DEFS_H_ #define _RTE_PCI_DEV_DEFS_H_ +#ifdef __cplusplus +extern "C" { +#endif + /* interrupt mode */ enum rte_intr_mode { RTE_INTR_MODE_NONE = 0, @@ -13,4 +17,8 @@ enum rte_intr_mode { RTE_INTR_MODE_MSIX }; +#ifdef __cplusplus +} +#endif + #endif /* _RTE_PCI_DEV_DEFS_H_ */ diff --git a/lib/eal/include/rte_pci_dev_features.h b/lib/eal/include/rte_pci_dev_features.h index 6104123d27..ee6e10590c 100644 --- a/lib/eal/include/rte_pci_dev_features.h +++ b/lib/eal/include/rte_pci_dev_features.h @@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_FEATURES_H #define _RTE_PCI_DEV_FEATURES_H +#ifdef __cplusplus +extern "C" { +#endif + #include #define RTE_INTR_MODE_NONE_NAME "none" @@ -12,4 +16,8 @@ #define RTE_INTR_MODE_MSI_NAME "msi" #define RTE_INTR_MODE_MSIX_NAME "msix" +#ifdef __cplusplus +} +#endif + #endif diff --git a/lib/eal/include/rte_time.h b/lib/eal/include/rte_time.h index 5ad7c8841a..ec25f7b93d 100644 --- a/lib/eal/include/rte_time.h +++ b/lib/eal/include/rte_time.h @@ -5,6 +5,10 @@ #ifndef _RTE_TIME_H_ #define _RTE_TIME_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -98,4 +102,8 @@ rte_ns_to_timespec(uint64_t nsec) return ts; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_TIME_H_ */ diff --git a/lib/eal/include/rte_trace_point_register.h b/lib/eal/include/rte_trace_point_register.h index 4f5c86552d..2e61439940 100644 --- a/lib/eal/include/rte_trace_point_register.h +++ b/lib/eal/include/rte_trace_point_register.h @@ -5,6 +5,10 @@ #ifndef _RTE_TRACE_POINT_REGISTER_H_ #define _RTE_TRACE_POINT_REGISTER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef _RTE_TRACE_POINT_H_ #error for registration, include this file first before #endif @@ -42,4 +46,8 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#ifdef __cplusplus +} +#endif + #endif /* _RTE_TRACE_POINT_REGISTER_H_ */ diff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h index 35c07c70cb..c72bf5b7e6 100644 --- a/lib/eal/linux/include/rte_os.h +++ b/lib/eal/linux/include/rte_os.h @@ -5,6 +5,10 @@ #ifndef _RTE_OS_H_ #define _RTE_OS_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * This header should contain any definition * which is not supported natively or named differently in Linux. @@ -42,4 +46,8 @@ typedef cpu_set_t rte_cpuset_t; } while (0) #endif +#ifdef __cplusplus +} +#endif + #endif /* _RTE_OS_H_ */ -- 2.25.1