From patchwork Wed Feb 16 15:14:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107682 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3522A00C5; Wed, 16 Feb 2022 16:15:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3ABD40150; Wed, 16 Feb 2022 16:15:43 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 9EDF340150; Wed, 16 Feb 2022 16:15:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024542; x=1676560542; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OlQUwApvIsZYAOVNqGhD9lmiEO1OJ8QL90xZPLjuyHc=; b=SqfCQ7mgYiyuG1QAzDCtM2SNSLRXpR8x8bM32AX4pMWSN4NhCJ5AUzPM EOF0LZJM2O/KSieQojHu8nMqg3bwsDorf6DggyK4+Xc8i94ykWmbuD6z9 35qTQXHtil0xGrvfFmrxYvwFpgCcUGHwTEXZMBfmiCwpRYGlA5k7cDR9L PesEMMcs2WkRUDBbl0onTVQr+y3GPqaRUrzIlp+4++t1VFAIeaCvfLJ2p q/snCrKmrTIW7glT8pbq9qE7ajeAfd+zt02mh+aJ9HvG/CVgK1J5rPZ+l uBTmJASkGblzFiSW3f+wBYbrcaMVf1G4juckmw/4THC+WeonZ/wa2PFBJ g==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824448" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824448" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084176" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:13 -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, Bruce Richardson , Ray Kinsella , Sunil Kumar Kori , Phil Yang , =?utf-8?q?Morten_Br=C3=B8rup?= , Gavin Hu , Sergio Gonzalez Monroy , Remy Horton , David Marchand , Pallavi Kadam , Harini Ramakrishnan Subject: [PATCH v2 01/11] eal: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:46 +0000 Message-Id: <20220216151456.114242-2-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't 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 Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- 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_ */ From patchwork Wed Feb 16 15:14:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107683 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34B55A00C5; Wed, 16 Feb 2022 16:15:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B07C141178; Wed, 16 Feb 2022 16:15:44 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0280040150; Wed, 16 Feb 2022 16:15:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024543; x=1676560543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oCE/rzsTAPHDJLXPQ1oNyoIih5xiyXgO7g9AMj6F9os=; b=nm30glCIa/TkFaAZ9jNpCKnkgs/i21KOIrIs3v3VUpEcoXzNOKt1om1J ivW+ai+vrqh0nebjyQe8zwXA+LeDq+TkBSQP+SaFhIrN5OoUDnEB/8FYe RxSBPMPR7N2KdtOzt4a+kFgo8ygrsv+k9TQgFNj5TEHMcOhQa1R21I+mJ CjfmUriUJdjDChwCKnnCvitb5t44hgDQzhP+ykTy3GdnaP6NQbbUonjjM Eyd/HAWnQrJn08m+ID+7Mgg0Eqx5geAB7QMfMLOvcjxPWsBICN/76NnAv U6A5N6gFvORf2TSGOj8WSKKkycfSG5TlfI949FTOGYmJoQofwyerL6+le A==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824463" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824463" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084225" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:18 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , ciara.power@intel.com, stable@dpdk.org, Bruce Richardson , Brian Archbold , Kevin Laatz , Radu Nicolau , Harry van Haaren Subject: [PATCH v2 02/11] telemetry: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:47 +0000 Message-Id: <20220216151456.114242-3-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: 8877ac688b52 ("telemetry: introduce infrastructure") Cc: ciara.power@intel.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/telemetry/rte_telemetry.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h index 7bca8a9a49..3372b32f38 100644 --- a/lib/telemetry/rte_telemetry.h +++ b/lib/telemetry/rte_telemetry.h @@ -9,6 +9,10 @@ #ifndef _RTE_TELEMETRY_H_ #define _RTE_TELEMETRY_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** Maximum length for string used in object. */ #define RTE_TEL_MAX_STRING_LEN 128 /** Maximum length of string. */ @@ -294,4 +298,8 @@ rte_tel_data_alloc(void); void rte_tel_data_free(struct rte_tel_data *data); +#ifdef __cplusplus +} +#endif + #endif From patchwork Wed Feb 16 15:14:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107684 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F4DAA00C5; Wed, 16 Feb 2022 16:15:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74D8A41186; Wed, 16 Feb 2022 16:15:47 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id E000F41163; Wed, 16 Feb 2022 16:15:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024545; x=1676560545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fawAYr6Jygc0LyigKteKnvZeKeU/ROf2PTC6ThoaIEc=; b=ER3Z7USI8t8j8xg3BrGRDpc3Js7j+bnA7ho0132tJA/94M60oMwghNmG rVag4LH25i/yvv6EtaaiT8QKIaIdDgtgTKEBMFQ/E7esENXNmIl8jA+gw 12lGq8ilXHAh6V6Ihz83aTMcKOTuDtHxU8q/V2sbjZTpj1xVxmOjjpkd1 gaTUE4M33xjn4xMQr87kytlDRJZ0RyVqkr78y8YtV4hzwkyveqxSdLqOR mrd7QtMtxMlgwTAXnXqXzac6UA5lY8Eveis0LGRmolmQtHYBHpykcImBc ZdjQYZg5K+ntQYwScCPXvRBp0m3ovbqnDR9lOYej4h43n/OxCqaQSYHFr A==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824488" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824488" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084286" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:20 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , liang-min.wang@intel.com, jblunck@infradead.org, ferruh.yigit@intel.com, thomas@monjalon.net, stable@dpdk.org, Bruce Richardson , Andrew Rybchenko , David Harton , Konstantin Ananyev , Andrew Harvey , Stephen Hemminger Subject: [PATCH v2 03/11] ethdev: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:48 +0000 Message-Id: <20220216151456.114242-4-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info") Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") Fixes: 7f0a669e7b04 ("ethdev: add allocation helper for virtual drivers") Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: liang-min.wang@intel.com Cc: jblunck@infradead.org Cc: ferruh.yigit@intel.com Cc: thomas@monjalon.net Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/ethdev/ethdev_driver.h | 8 ++++++++ lib/ethdev/ethdev_pci.h | 8 ++++++++ lib/ethdev/ethdev_vdev.h | 8 ++++++++ lib/ethdev/rte_dev_info.h | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 6d697a879a..5ec00e533e 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -5,6 +5,10 @@ #ifndef _RTE_ETHDEV_DRIVER_H_ #define _RTE_ETHDEV_DRIVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * @@ -1881,4 +1885,8 @@ struct rte_eth_tunnel_filter_conf { uint16_t queue_id; /**< Queue assigned to if match */ }; +#ifdef __cplusplus +} +#endif + #endif /* _RTE_ETHDEV_DRIVER_H_ */ diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h index 71aa4b2e98..6130bcbd1f 100644 --- a/lib/ethdev/ethdev_pci.h +++ b/lib/ethdev/ethdev_pci.h @@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_PCI_H_ #define _RTE_ETHDEV_PCI_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -171,4 +175,8 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev, return 0; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_ETHDEV_PCI_H_ */ diff --git a/lib/ethdev/ethdev_vdev.h b/lib/ethdev/ethdev_vdev.h index 2b49e9665b..f5f536ce64 100644 --- a/lib/ethdev/ethdev_vdev.h +++ b/lib/ethdev/ethdev_vdev.h @@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_VDEV_H_ #define _RTE_ETHDEV_VDEV_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -52,4 +56,8 @@ rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size) return eth_dev; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_ETHDEV_VDEV_H_ */ diff --git a/lib/ethdev/rte_dev_info.h b/lib/ethdev/rte_dev_info.h index cb2fe0ae97..67cf0ae526 100644 --- a/lib/ethdev/rte_dev_info.h +++ b/lib/ethdev/rte_dev_info.h @@ -5,6 +5,10 @@ #ifndef _RTE_DEV_INFO_H_ #define _RTE_DEV_INFO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include /* @@ -48,4 +52,8 @@ struct rte_eth_dev_module_info { #define RTE_ETH_MODULE_SFF_8436_LEN 256 #define RTE_ETH_MODULE_SFF_8436_MAX_LEN 640 +#ifdef __cplusplus +} +#endif + #endif /* _RTE_DEV_INFO_H_ */ From patchwork Wed Feb 16 15:14:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107685 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87098A00C5; Wed, 16 Feb 2022 16:16:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 605B341180; Wed, 16 Feb 2022 16:15:50 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C5DF0410FF; Wed, 16 Feb 2022 16:15:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024547; x=1676560547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kE0JO5D+B71eSIc/QUA31MIGnUMHH81rVJNtjlVHgKM=; b=Xz6Jl/eDdRpsUYxTo39Lv18G2WCyOS3w9TQGvS0dFp49QI+m5ILYTORZ kzqinO3W1QHiq25qBzPnLoFNTV6V2SFANwb5vri+GGAeAKpa5PPY3E4L7 To832Pc4YVK4WGd9FLJjaE+B0405DfBMxDEPk2QCe502uZcTJbHGYtukA EXdP3JfzT5neq8kHfGTfl0mybPTlaw26WRGR6L9aSQrJHbp83atDfc4/J jXHebdBmG7PzahRfJpW6GA4TSr9SIjEoAk28HOoT5/U98nc9bfSuD3sWt HyMJMYwpEhKqi7pl9dMbOPlVF3gozyLJ3wPQKLI08XX7b6b+ktwqN4Lso g==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824497" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824497" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084330" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:24 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , ciara.power@intel.com, stable@dpdk.org, Bruce Richardson , Keith Wiles Subject: [PATCH v2 04/11] metrics: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:49 +0000 Message-Id: <20220216151456.114242-5-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: c5b7197f662e ("telemetry: move some functions to metrics library") Cc: ciara.power@intel.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/metrics/rte_metrics_telemetry.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/metrics/rte_metrics_telemetry.h b/lib/metrics/rte_metrics_telemetry.h index 2b6eb1ccc8..09b14d9336 100644 --- a/lib/metrics/rte_metrics_telemetry.h +++ b/lib/metrics/rte_metrics_telemetry.h @@ -13,6 +13,9 @@ #ifndef _RTE_METRICS_TELEMETRY_H_ #define _RTE_METRICS_TELEMETRY_H_ +#ifdef __cplusplus +extern "C" { +#endif enum rte_telemetry_stats_type { PORT_STATS = 0, @@ -60,4 +63,8 @@ __rte_experimental int32_t rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data); +#ifdef __cplusplus +} +#endif + #endif From patchwork Wed Feb 16 15:14:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107686 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EBF0A00C5; Wed, 16 Feb 2022 16:16:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 364D0411AE; Wed, 16 Feb 2022 16:15:51 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id CE78941190; Wed, 16 Feb 2022 16:15:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024548; x=1676560548; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lp4oHt/w4Z9dya9mj9Xx3bezRiKmux9AyyrHrp3CJKk=; b=HlhIbnmk/aKtcSfCVJE2kiBCIE2Gl36jYbbczhFSk/c97Ws+ZAMJV9vi gUKrFaY/j4m1o0i7dHzyhJpJABcr9HvTk8gOmzSBcm/rJ8PNt1NpDaSRT yB3fOsSNWDiYLWwWj47tTjyF+ok+gdWGn8zY1Z6q4CgxzUrdmBOG3B/F3 ilDYTU5VF2ef8TYM7/v/zPuvX1SQSsxiEbIjnPYjIS1F0MjjyeSNtq/pF KBQ4Rdwaq+/jlUNpJ97MmFQ2lsS7mF9Wq/bS3TRR957DdQkxYgtq3e5S0 ojZ5/YxyAxdaChIyDmS9Q1sVsobK0xzRoL6NHLqZDR4mz7hBpx9//AJvs w==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824506" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824506" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084355" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:26 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , konstantin.ananyev@intel.com, stable@dpdk.org, Bruce Richardson , Pablo de Lara Guarch Subject: [PATCH v2 05/11] acl: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:50 +0000 Message-Id: <20220216151456.114242-6-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: dc276b5780c2 ("acl: new library") Cc: konstantin.ananyev@intel.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/acl/rte_acl_osdep.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/acl/rte_acl_osdep.h b/lib/acl/rte_acl_osdep.h index b2c262dee7..3c1dc402ca 100644 --- a/lib/acl/rte_acl_osdep.h +++ b/lib/acl/rte_acl_osdep.h @@ -5,6 +5,10 @@ #ifndef _RTE_ACL_OSDEP_H_ #define _RTE_ACL_OSDEP_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * @@ -45,4 +49,8 @@ #include #include +#ifdef __cplusplus +} +#endif + #endif /* _RTE_ACL_OSDEP_H_ */ From patchwork Wed Feb 16 15:14:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107687 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83377A00C5; Wed, 16 Feb 2022 16:16:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C733411CE; Wed, 16 Feb 2022 16:15:53 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C47FB41163; Wed, 16 Feb 2022 16:15:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024550; x=1676560550; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=leVjn4ZPMKBaS1gaEtjGm2OFB4wPEDea0ZZ4EZ62R94=; b=ZkuoNz1bfvq7OAgHALX38NnQ+E6lWReE40a7chz0ul6ZXmI63e2MIoan NA9qJpvAc0Fb9dDqJTx7MP52XxDzfx1ZbfZ4JbN5wonAUNgurdzlqLPFu EtkRpKW05DoyrCessRZuVgRouErpiXkovUrG5Q515M3VRGITSZdrXr0jG DDpmQZGv6Rx/MxojVaWc6Jep71OxvPANDiu0xjzUZLk6SMPvsRX4vrc20 7Ls3noZIG0ubpeL+U9XbyopV8p+Dg1oJBXoSNHWq4vpQV/76uCDP/CD9m RvKSp/zAL0ZShfTjI3ehBYlHAO+tDBu6Lh1Z/7Xfx1FX63v+JDikPJ3wz Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824524" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824524" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084409" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:28 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , fiona.trahe@intel.com, stable@dpdk.org, Bruce Richardson , Fan Zhang , Ashish Gupta , Shally Verma , Pablo de Lara Subject: [PATCH v2 06/11] compressdev: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:51 +0000 Message-Id: <20220216151456.114242-7-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: ed7dd94f7f66 ("compressdev: add basic device management") Cc: fiona.trahe@intel.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/compressdev/rte_compressdev_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h index 22ceac66e2..888c8f5c5c 100644 --- a/lib/compressdev/rte_compressdev_internal.h +++ b/lib/compressdev/rte_compressdev_internal.h @@ -5,6 +5,10 @@ #ifndef _RTE_COMPRESSDEV_INTERNAL_H_ #define _RTE_COMPRESSDEV_INTERNAL_H_ +#ifdef __cplusplus +extern "C" { +#endif + /* rte_compressdev_internal.h * This file holds Compressdev private data structures. */ @@ -111,4 +115,9 @@ struct rte_compressdev_data { void *dev_private; /**< PMD-specific private data */ } __rte_cache_aligned; + +#ifdef __cplusplus +} +#endif + #endif From patchwork Wed Feb 16 15:14:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107688 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 737F9A00C5; Wed, 16 Feb 2022 16:16:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CDFE411EE; Wed, 16 Feb 2022 16:15:54 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id D144A41169; Wed, 16 Feb 2022 16:15:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024551; x=1676560551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i8PdNgpO9+wh3DYGwtbwcUAjBvyZpDW+FtnrQgRiyg4=; b=Uj+9IwJ3qcjytsmZFscrirBoAk/w9p5DNfj+Sj1shyVJu5vcxKtu4TMF QypHLFManW9PuRDNZlFfpS6Ry3ViPL6YWyKaGzV7cVvr2tY6YQqCQwJgO 42+YHH68je9cCexpxi7nimm9BOuV43O0XvEKgOe7BNir9/JrRS3BRPxx7 xbbjW62IZSprtuM0RFxeNcMhOfjterMms+m0ZoBpO874ImgaWAJuPksa8 ZAgx+3eh7UAleayvAZnF4oDPFKlWT4ihKdAMQCpJ2GA0lOmmkyMn3Tq0S FKteOIv4ZwSWx3tPJQ4DomzPBkL3CCcJGvaUvdEM1WGDH2ZDZMUD1mvi4 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824532" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824532" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084445" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:30 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , bruce.richardson@intel.com, thomas@monjalon.net, stable@dpdk.org, Jerin Jacob , Harry van Haaren Subject: [PATCH v2 07/11] eventdev: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:52 +0000 Message-Id: <20220216151456.114242-8-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: dc39e2f359b5 ("eventdev: add ring structure for events") Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: bruce.richardson@intel.com Cc: thomas@monjalon.net Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/eventdev/eventdev_pmd.h | 8 ++++++++ lib/eventdev/eventdev_pmd_pci.h | 8 ++++++++ lib/eventdev/eventdev_pmd_vdev.h | 8 ++++++++ lib/eventdev/rte_event_ring.h | 9 +++++++++ 4 files changed, 33 insertions(+) diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index b05ffce549..ce469d47a6 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -5,6 +5,10 @@ #ifndef _RTE_EVENTDEV_PMD_H_ #define _RTE_EVENTDEV_PMD_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** @file * RTE Event PMD APIs * @@ -1366,4 +1370,8 @@ void event_dev_fp_ops_set(struct rte_event_fp_ops *fp_ops, const struct rte_eventdev *dev); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_EVENTDEV_PMD_H_ */ diff --git a/lib/eventdev/eventdev_pmd_pci.h b/lib/eventdev/eventdev_pmd_pci.h index 499852db16..24b56faaa9 100644 --- a/lib/eventdev/eventdev_pmd_pci.h +++ b/lib/eventdev/eventdev_pmd_pci.h @@ -5,6 +5,10 @@ #ifndef _RTE_EVENTDEV_PMD_PCI_H_ #define _RTE_EVENTDEV_PMD_PCI_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** @file * RTE Eventdev PCI PMD APIs * @@ -150,4 +154,8 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev, return 0; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_EVENTDEV_PMD_PCI_H_ */ diff --git a/lib/eventdev/eventdev_pmd_vdev.h b/lib/eventdev/eventdev_pmd_vdev.h index d9ee7277dd..77904910a2 100644 --- a/lib/eventdev/eventdev_pmd_vdev.h +++ b/lib/eventdev/eventdev_pmd_vdev.h @@ -5,6 +5,10 @@ #ifndef _RTE_EVENTDEV_PMD_VDEV_H_ #define _RTE_EVENTDEV_PMD_VDEV_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** @file * RTE Eventdev VDEV PMD APIs * @@ -99,4 +103,8 @@ rte_event_pmd_vdev_uninit(const char *name) return 0; } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_EVENTDEV_PMD_VDEV_H_ */ diff --git a/lib/eventdev/rte_event_ring.h b/lib/eventdev/rte_event_ring.h index c0861b0ec2..0b9aefb000 100644 --- a/lib/eventdev/rte_event_ring.h +++ b/lib/eventdev/rte_event_ring.h @@ -14,6 +14,10 @@ #ifndef _RTE_EVENT_RING_ #define _RTE_EVENT_RING_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -266,4 +270,9 @@ rte_event_ring_get_capacity(const struct rte_event_ring *r) { return rte_ring_get_capacity(&r->r); } + +#ifdef __cplusplus +} +#endif + #endif From patchwork Wed Feb 16 15:14:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107689 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FC43A00C5; Wed, 16 Feb 2022 16:16:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64C2541223; Wed, 16 Feb 2022 16:15:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 695C2411B6; Wed, 16 Feb 2022 16:15:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024551; x=1676560551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Sf98aO0zo+1mWm0J5+3dWj0RrTIHY4QGVy2Hdhqualo=; b=Y4Nq2jXf8m4szKDeyTy0bBhTfS26mg50XQVqvbmk+ze0qBbUWQZVLkg8 MNSh3lJqD7C/v9kn67QfMxbZcELjlm0g8TMXFa7MDr1p0gGbt9l74JWA6 CT3suWQKk0coU8j2AonOXPMWYIrJv/4JByxwLQmjQdeyIamm+uH8ZvOvd UH1iAanvRl6oF8FoZqQYubSeAlbwRmV3/pbOrgwgdX7JeK6gbodOeA87T 1GGJGR5XScBFBAFJieIVVwNUUC8GIq+5KxJ4C1gc8295hkmb8XbvmfeDc Weynu6+TLc/N1QOnkHPRnTChEzwQNjku7Bv8+EcUQtBwZCsHEcfnKtHry g==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824542" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824542" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084479" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:33 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , stable@dpdk.org, Bruce Richardson , Ferruh Yigit Subject: [PATCH v2 08/11] kni: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:53 +0000 Message-Id: <20220216151456.114242-9-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: 3fc5ca2f6352 ("kni: initial import") Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/kni/rte_kni_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h index b547ea5501..8d3ee0fa4f 100644 --- a/lib/kni/rte_kni_common.h +++ b/lib/kni/rte_kni_common.h @@ -6,6 +6,10 @@ #ifndef _RTE_KNI_COMMON_H_ #define _RTE_KNI_COMMON_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __KERNEL__ #include #include @@ -136,4 +140,8 @@ struct rte_kni_device_info { #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info) #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info) +#ifdef __cplusplus +} +#endif + #endif /* _RTE_KNI_COMMON_H_ */ From patchwork Wed Feb 16 15:14:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107690 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F25D1A00C5; Wed, 16 Feb 2022 16:16:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BBD1411FB; Wed, 16 Feb 2022 16:15:57 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 5A240411B2; Wed, 16 Feb 2022 16:15:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024552; x=1676560552; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Un1lSt/pUBk8B0NLrHHFjucJaYXZ2DBdKWU15v07Qk8=; b=JfJUo4yQ4+7tMgJMn5LQpl5mo/I4gYOH8RIIY1zbCKNBhqgr5piHZErF 88oibZBSHo6F+l2pg3nQbfEyKca4TcEaNWQC+M2CC5jl/K/fZ5Pv2coZV z+wieRtU+cr2qc8+Iqj+w1jDhDpUvpfZ1FJnPuktQqT8kztZLdvVPAYll WwgxQJbo9f0N3G6CYdiOHd/wM+l3LWR8+oEQ+1ttyWZCtR5V/MXWf7Lh2 l1/+97Jy9Ue5+EWfLdjP8a9SSiBDdsP4nlKYrRCrnDx2bcSeJvj6Wfhci +d2YyO+IDyJlqZKyVBMO0+Lt85b5P2ttUmThu9wZbZF6dZl9yDu5utYmf Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824564" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824564" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084527" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:35 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , zhihong.wang@intel.com, patrick.fu@intel.com, roy.fan.zhang@intel.com, maxime.coquelin@redhat.com, stable@dpdk.org, Bruce Richardson , Chenbo Xia , Jay Zhou , Thomas Monjalon Subject: [PATCH v2 09/11] vhost: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:54 +0000 Message-Id: <20220216151456.114242-10-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: d7280c9fffcb ("vhost: support selective datapath") Fixes: 78639d54563a ("vhost: introduce async enqueue registration API") Fixes: 3bb595ecd682 ("vhost/crypto: add request handler") Fixes: 94c16e89d779 ("vhost: mark vDPA driver API as internal") Cc: zhihong.wang@intel.com Cc: patrick.fu@intel.com Cc: roy.fan.zhang@intel.com Cc: maxime.coquelin@redhat.com Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson Reviewed-by: Chenbo Xia --- v2: Added missing apostrophe to commit message. --- lib/vhost/rte_vdpa.h | 9 +++++++++ lib/vhost/rte_vhost_async.h | 8 ++++++++ lib/vhost/rte_vhost_crypto.h | 8 ++++++++ lib/vhost/vdpa_driver.h | 8 ++++++++ 4 files changed, 33 insertions(+) diff --git a/lib/vhost/rte_vdpa.h b/lib/vhost/rte_vdpa.h index 1437f400bf..6ac85d1bbf 100644 --- a/lib/vhost/rte_vdpa.h +++ b/lib/vhost/rte_vdpa.h @@ -5,6 +5,10 @@ #ifndef _RTE_VDPA_H_ #define _RTE_VDPA_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * @@ -183,4 +187,9 @@ rte_vdpa_get_stats(struct rte_vdpa_device *dev, uint16_t qid, */ int rte_vdpa_reset_stats(struct rte_vdpa_device *dev, uint16_t qid); + +#ifdef __cplusplus +} +#endif + #endif /* _RTE_VDPA_H_ */ diff --git a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h index 838c4778cc..f1293c6a9d 100644 --- a/lib/vhost/rte_vhost_async.h +++ b/lib/vhost/rte_vhost_async.h @@ -5,6 +5,10 @@ #ifndef _RTE_VHOST_ASYNC_H_ #define _RTE_VHOST_ASYNC_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -183,4 +187,8 @@ uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id, __rte_experimental int rte_vhost_async_dma_configure(int16_t dma_id, uint16_t vchan_id); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_VHOST_ASYNC_H_ */ diff --git a/lib/vhost/rte_vhost_crypto.h b/lib/vhost/rte_vhost_crypto.h index f54d731139..b49e389579 100644 --- a/lib/vhost/rte_vhost_crypto.h +++ b/lib/vhost/rte_vhost_crypto.h @@ -5,6 +5,10 @@ #ifndef _VHOST_CRYPTO_H_ #define _VHOST_CRYPTO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -132,4 +136,8 @@ uint16_t rte_vhost_crypto_finalize_requests(struct rte_crypto_op **ops, uint16_t nb_ops, int *callfds, uint16_t *nb_callfds); +#ifdef __cplusplus +} +#endif + #endif /**< _VHOST_CRYPTO_H_ */ diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h index fddbd50652..88138be34a 100644 --- a/lib/vhost/vdpa_driver.h +++ b/lib/vhost/vdpa_driver.h @@ -5,6 +5,10 @@ #ifndef _VDPA_DRIVER_H_ #define _VDPA_DRIVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include #include @@ -144,4 +148,8 @@ __rte_internal int rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m); +#ifdef __cplusplus +} +#endif + #endif /* _VDPA_DRIVER_H_ */ From patchwork Wed Feb 16 15:14:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107691 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CAED7A00C5; Wed, 16 Feb 2022 16:16:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9AB441C3C; Wed, 16 Feb 2022 16:15:58 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A0D0E411B6; Wed, 16 Feb 2022 16:15:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024553; x=1676560553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j4HRYgcXVCFZF1sGp40jUm3SyqfokbIKrFYG5BBA5MY=; b=hNDb295H6xPHmPY637aR3AChSdo8BS5E1oD5eXxIAmOzGrDri+KmyWA5 0IVZRCjAmlP/Up9cgz7VcCuwB+Ly8Rgh8twGi01yYfvyQhCmTIrJdcG0d 9/lzpj8AUH1LCBq8H/FO2G8oEpN4HOnyhqmj5zHxGt3qnMH1hDNvHPhBf aoZA0PIaU5gsm92GApCcCVrzukspakvYVBMKoCrUVrvBpjnZ95ktr41so 6IkhKwKm3u+FZxv41CrnE8lIqGyESGzOmfEebRO71TBthbwYS6hO66S69 Ny9n7cQxZ5RGkTZ7MMdt+uUeBAnw+NJ64aIiq4RcMZI84hZUdr9DmLh2q w==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824573" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824573" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084564" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:38 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , thomas@monjalon.net, stable@dpdk.org, Bruce Richardson , Konstantin Ananyev Subject: [PATCH v2 10/11] bpf: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:55 +0000 Message-Id: <20220216151456.114242-11-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: thomas@monjalon.net Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/bpf/bpf_def.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/bpf/bpf_def.h b/lib/bpf/bpf_def.h index fa9125307e..f08cd9106b 100644 --- a/lib/bpf/bpf_def.h +++ b/lib/bpf/bpf_def.h @@ -7,6 +7,10 @@ #ifndef _RTE_BPF_DEF_H_ #define _RTE_BPF_DEF_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * @@ -140,4 +144,8 @@ struct ebpf_insn { */ #define EBPF_FUNC_MAX_ARGS (EBPF_REG_6 - EBPF_REG_1) +#ifdef __cplusplus +} +#endif + #endif /* RTE_BPF_DEF_H_ */ From patchwork Wed Feb 16 15:14:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 107692 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99B78A00C5; Wed, 16 Feb 2022 16:16:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B56A8426D4; Wed, 16 Feb 2022 16:15:59 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2139A411C9; Wed, 16 Feb 2022 16:15:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645024553; x=1676560553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KGlr12QX+8pjMxZS8Zxwt8NS6lfUge+r4SskGzmPsI0=; b=g/DQklcyQPSd/kGI6Zx9x689KEAeehcynFP//4ux2PiYK57lWh4j164B vicQ9Ftnm3oLeechBAsS5cPeBQxqf8fiPjMeMyo1JT/mkA2SVBzbUQ/5Z w7L7c9Fx2Ak8JNjR5c8BQILiuEkuSLVnkNsoxr//nKCvPOEupcd/tuS6x d09YC8xIzTkIgqWRC5awoJ0j5KTd260+eqsJRroDycM7nrdVdAV2WLyEt YuQEJOc5QCOtLYhwntcJZ7ZznfMsJsmQi3/CE6C5qHz5LXuVSNUDvtbMi M4eoG0TXza9xXFYxN4D5fZsT9IWShomOpZXPb7ikG4SwfwQpKfg1QiwNL A==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="250824582" X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="250824582" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 07:15:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,374,1635231600"; d="scan'208";a="487084601" Received: from unknown (HELO silpixa00400883.ir.intel.com) ([10.243.23.143]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2022 07:15:40 -0800 From: Brian Dooley To: dev@dpdk.org Cc: Brian Dooley , thomas@monjalon.net, stable@dpdk.org, Bruce Richardson , Akhil Goyal , Fan Zhang Subject: [PATCH v2 11/11] cryptodev: fix missing C++ guards Date: Wed, 16 Feb 2022 15:14:56 +0000 Message-Id: <20220216151456.114242-12-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216151456.114242-1-brian.dooley@intel.com> References: <20220215170817.662136-1-brian.dooley@intel.com> <20220216151456.114242-1-brian.dooley@intel.com> MIME-Version: 1.0 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 couldn't be used by C++ applications. Add the missing guards. Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers") Cc: thomas@monjalon.net Cc: stable@dpdk.org Signed-off-by: Brian Dooley Acked-by: Bruce Richardson --- v2: Added missing apostrophe to commit message. --- lib/cryptodev/cryptodev_pmd.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h index d91902f6e0..24ff1a5480 100644 --- a/lib/cryptodev/cryptodev_pmd.h +++ b/lib/cryptodev/cryptodev_pmd.h @@ -5,6 +5,10 @@ #ifndef _CRYPTODEV_PMD_H_ #define _CRYPTODEV_PMD_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** @file * RTE Crypto PMD APIs * @@ -640,4 +644,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session { uint8_t sess_private_data[0]; }; +#ifdef __cplusplus +} +#endif + #endif /* _CRYPTODEV_PMD_H_ */