add missing C++ guards
cover add missing C++ guards
Public header files were missing 'extern "C"' guards. This set adds them in.
Brian Dooley (11):
eal: fix missing C++ guards
telemetry: fix missing C++ guards
ethdev: fix missing C++ guards
metrics: fix missing C++ guards
acl: fix missing C++ guards
compressdev: fix missing C++ guards
eventdev: fix missing C++ guards
kni: fix missing C++ guards
vhost: fix missing C++ guards
bpf: fix missing C++ guards
cryptodev: fix missing C++ guards
lib/acl/rte_acl_osdep.h | 8 ++++++++ lib/bpf/bpf_def.h | 8 ++++++++ lib/compressdev/rte_compressdev_internal.h | 9 +++++++++ lib/cryptodev/cryptodev_pmd.h | 8 ++++++++ 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 ++++++++ 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 ++++++++ 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 +++++++++ lib/kni/rte_kni_common.h | 8 ++++++++ lib/metrics/rte_metrics_telemetry.h | 7 +++++++ lib/telemetry/rte_telemetry.h | 8 ++++++++ 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 ++++++++ 29 files changed, 234 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/11 eal: fix missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- 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(+)
lib/eal/include/rte_bitops.h +8 -0
@@ -17,6 +17,10 @@#include <rte_debug.h> #include <rte_compat.h> +#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_ */
lib/eal/include/rte_branch_prediction.h +8 -0
@@ -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_ */
lib/eal/include/rte_compat.h +8 -0
@@ -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_ */
lib/eal/include/rte_hypervisor.h +8 -0
@@ -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 */
lib/eal/include/rte_keepalive.h +8 -0
@@ -11,6 +11,10 @@ #ifndef _KEEPALIVE_H_ #define _KEEPALIVE_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_config.h> #include <rte_memory.h>
@@ -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_ */
lib/eal/include/rte_pci_dev_feature_defs.h +8 -0
@@ -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_ */
lib/eal/include/rte_pci_dev_features.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_FEATURES_H #define _RTE_PCI_DEV_FEATURES_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_pci_dev_feature_defs.h> #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
lib/eal/include/rte_time.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_TIME_H_ #define _RTE_TIME_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <time.h>
@@ -98,4 +102,8 @@ rte_ns_to_timespec(uint64_t nsec)return ts; } +#ifdef __cplusplus +} +#endif +#endif /* _RTE_TIME_H_ */
lib/eal/include/rte_trace_point_register.h +8 -0
@@ -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 <rte_trace_point.h> #endif
@@ -42,4 +46,8 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#ifdef __cplusplus +} +#endif +#endif /* _RTE_TRACE_POINT_REGISTER_H_ */
lib/eal/linux/include/rte_os.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
PATCH 2/11 telemetry: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/telemetry/rte_telemetry.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/telemetry/rte_telemetry.h +8 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 3/11 ethdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- 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(+)
lib/ethdev/ethdev_driver.h +8 -0
@@ -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_ */
lib/ethdev/ethdev_pci.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_PCI_H_ #define _RTE_ETHDEV_PCI_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_malloc.h> #include <rte_pci.h> #include <rte_bus_pci.h>
@@ -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_ */
lib/ethdev/ethdev_vdev.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_VDEV_H_ #define _RTE_ETHDEV_VDEV_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_config.h> #include <rte_malloc.h> #include <rte_bus_vdev.h>
@@ -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_ */
lib/ethdev/rte_dev_info.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_DEV_INFO_H_ #define _RTE_DEV_INFO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> /*
@@ -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_ */
Signature · 1 line
2.25.1
PATCH 4/11 metrics: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/metrics/rte_metrics_telemetry.h | 7 +++++++ 1 file changed, 7 insertions(+)
lib/metrics/rte_metrics_telemetry.h +7 -0
@@ -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_experimentalint32_t rte_metrics_tel_extract_data (struct telemetry_encode_param *ep,json_t *data); +#ifdef __cplusplus +} +#endif +#endif
Signature · 1 line
2.25.1
PATCH 5/11 acl: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/acl/rte_acl_osdep.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/acl/rte_acl_osdep.h +8 -0
@@ -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 <rte_cpuflags.h> #include <rte_debug.h> +#ifdef __cplusplus +} +#endif +#endif /* _RTE_ACL_OSDEP_H_ */
Signature · 1 line
2.25.1
PATCH 6/11 compressdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/compressdev/rte_compressdev_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/compressdev/rte_compressdev_internal.h +9 -0
@@ -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
Signature · 1 line
2.25.1
PATCH 7/11 eventdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- 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(+)
lib/eventdev/eventdev_pmd.h +8 -0
@@ -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_ */
lib/eventdev/eventdev_pmd_pci.h +8 -0
@@ -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_ */
lib/eventdev/eventdev_pmd_vdev.h +8 -0
@@ -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_ */
lib/eventdev/rte_event_ring.h +9 -0
@@ -14,6 +14,10 @@ #ifndef _RTE_EVENT_RING_ #define _RTE_EVENT_RING_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_common.h>
@@ -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
Signature · 1 line
2.25.1
PATCH 8/11 kni: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/kni/rte_kni_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/kni/rte_kni_common.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_KNI_COMMON_H_ #define _RTE_KNI_COMMON_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __KERNEL__ #include <linux/if.h> #include <asm/barrier.h>
@@ -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_ */
Signature · 1 line
2.25.1
PATCH 9/11 vhost: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- 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(+)
lib/vhost/rte_vdpa.h +9 -0
@@ -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_ */
lib/vhost/rte_vhost_async.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_VHOST_ASYNC_H_ #define _RTE_VHOST_ASYNC_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_compat.h>
@@ -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_ */
lib/vhost/rte_vhost_crypto.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _VHOST_CRYPTO_H_ #define _VHOST_CRYPTO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_compat.h>
@@ -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_ */
lib/vhost/vdpa_driver.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _VDPA_DRIVER_H_ #define _VDPA_DRIVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> #include <rte_compat.h>
@@ -144,4 +148,8 @@ __rte_internalint rte_vdpa_relay_vring_used (int vid,uint16_t qid,void *vring_m); +#ifdef __cplusplus +} +#endif +#endif /* _VDPA_DRIVER_H_ */
Signature · 1 line
2.25.1
PATCH 10/11 bpf: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/bpf/bpf_def.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/bpf/bpf_def.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
PATCH 11/11 cryptodev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldnt be used by C++ applications. Add the missing guards.
--- lib/cryptodev/cryptodev_pmd.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/cryptodev/cryptodev_pmd.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
Quoted 16 lines · Brian Dooley
Public header files were missing 'extern "C"' guards. This set adds them in.
Brian Dooley (11):
eal: fix missing C++ guards
telemetry: fix missing C++ guards
ethdev: fix missing C++ guards
metrics: fix missing C++ guards
acl: fix missing C++ guards
compressdev: fix missing C++ guards
eventdev: fix missing C++ guards
kni: fix missing C++ guards
vhost: fix missing C++ guards
bpf: fix missing C++ guards
cryptodev: fix missing C++ guards
Good cleanup to have for compatibility.
v2 cover add missing C++ guards
In reply to Brian DooleyPublic header files were missing 'extern "C"' guards. This set adds them in.
v2:
- Fixed checkpatch errors
Brian Dooley (11):
eal: fix missing C++ guards
telemetry: fix missing C++ guards
ethdev: fix missing C++ guards
metrics: fix missing C++ guards
acl: fix missing C++ guards
compressdev: fix missing C++ guards
eventdev: fix missing C++ guards
kni: fix missing C++ guards
vhost: fix missing C++ guards
bpf: fix missing C++ guards
cryptodev: fix missing C++ guards
lib/acl/rte_acl_osdep.h | 8 ++++++++ lib/bpf/bpf_def.h | 8 ++++++++ lib/compressdev/rte_compressdev_internal.h | 9 +++++++++ lib/cryptodev/cryptodev_pmd.h | 8 ++++++++ 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 ++++++++ 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 ++++++++ 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 +++++++++ lib/kni/rte_kni_common.h | 8 ++++++++ lib/metrics/rte_metrics_telemetry.h | 7 +++++++ lib/telemetry/rte_telemetry.h | 8 ++++++++ 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 ++++++++ 29 files changed, 234 insertions(+)
Signature · 1 line
2.25.1
PATCH v2 1/11 eal: fix missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
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(+)
lib/eal/include/rte_bitops.h +8 -0
@@ -17,6 +17,10 @@#include <rte_debug.h> #include <rte_compat.h> +#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_ */
lib/eal/include/rte_branch_prediction.h +8 -0
@@ -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_ */
lib/eal/include/rte_compat.h +8 -0
@@ -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_ */
lib/eal/include/rte_hypervisor.h +8 -0
@@ -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 */
lib/eal/include/rte_keepalive.h +8 -0
@@ -11,6 +11,10 @@ #ifndef _KEEPALIVE_H_ #define _KEEPALIVE_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_config.h> #include <rte_memory.h>
@@ -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_ */
lib/eal/include/rte_pci_dev_feature_defs.h +8 -0
@@ -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_ */
lib/eal/include/rte_pci_dev_features.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_PCI_DEV_FEATURES_H #define _RTE_PCI_DEV_FEATURES_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_pci_dev_feature_defs.h> #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
lib/eal/include/rte_time.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_TIME_H_ #define _RTE_TIME_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <time.h>
@@ -98,4 +102,8 @@ rte_ns_to_timespec(uint64_t nsec)return ts; } +#ifdef __cplusplus +} +#endif +#endif /* _RTE_TIME_H_ */
lib/eal/include/rte_trace_point_register.h +8 -0
@@ -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 <rte_trace_point.h> #endif
@@ -42,4 +46,8 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#ifdef __cplusplus +} +#endif +#endif /* _RTE_TRACE_POINT_REGISTER_H_ */
lib/eal/linux/include/rte_os.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
PATCH v2 2/11 telemetry: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/telemetry/rte_telemetry.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/telemetry/rte_telemetry.h +8 -0
@@ -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
Signature · 1 line
2.25.1
PATCH v2 3/11 ethdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
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(+)
lib/ethdev/ethdev_driver.h +8 -0
@@ -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_ */
lib/ethdev/ethdev_pci.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_PCI_H_ #define _RTE_ETHDEV_PCI_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_malloc.h> #include <rte_pci.h> #include <rte_bus_pci.h>
@@ -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_ */
lib/ethdev/ethdev_vdev.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_ETHDEV_VDEV_H_ #define _RTE_ETHDEV_VDEV_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rte_config.h> #include <rte_malloc.h> #include <rte_bus_vdev.h>
@@ -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_ */
lib/ethdev/rte_dev_info.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_DEV_INFO_H_ #define _RTE_DEV_INFO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> /*
@@ -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_ */
Signature · 1 line
2.25.1
PATCH v2 4/11 metrics: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/metrics/rte_metrics_telemetry.h | 7 +++++++ 1 file changed, 7 insertions(+)
lib/metrics/rte_metrics_telemetry.h +7 -0
@@ -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_experimentalint32_t rte_metrics_tel_extract_data (struct telemetry_encode_param *ep,json_t *data); +#ifdef __cplusplus +} +#endif +#endif
Signature · 1 line
2.25.1
PATCH v2 5/11 acl: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/acl/rte_acl_osdep.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/acl/rte_acl_osdep.h +8 -0
@@ -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 <rte_cpuflags.h> #include <rte_debug.h> +#ifdef __cplusplus +} +#endif +#endif /* _RTE_ACL_OSDEP_H_ */
Signature · 1 line
2.25.1
PATCH v2 6/11 compressdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/compressdev/rte_compressdev_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/compressdev/rte_compressdev_internal.h +9 -0
@@ -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
Signature · 1 line
2.25.1
PATCH v2 7/11 eventdev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
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(+)
lib/eventdev/eventdev_pmd.h +8 -0
@@ -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_ */
lib/eventdev/eventdev_pmd_pci.h +8 -0
@@ -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_ */
lib/eventdev/eventdev_pmd_vdev.h +8 -0
@@ -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_ */
lib/eventdev/rte_event_ring.h +9 -0
@@ -14,6 +14,10 @@ #ifndef _RTE_EVENT_RING_ #define _RTE_EVENT_RING_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_common.h>
@@ -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
Signature · 1 line
2.25.1
PATCH v2 8/11 kni: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/kni/rte_kni_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/kni/rte_kni_common.h +8 -0
@@ -6,6 +6,10 @@ #ifndef _RTE_KNI_COMMON_H_ #define _RTE_KNI_COMMON_H_ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __KERNEL__ #include <linux/if.h> #include <asm/barrier.h>
@@ -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_ */
Signature · 1 line
2.25.1
PATCH v2 9/11 vhost: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
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(+)
lib/vhost/rte_vdpa.h +9 -0
@@ -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_ */
lib/vhost/rte_vhost_async.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _RTE_VHOST_ASYNC_H_ #define _RTE_VHOST_ASYNC_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_compat.h>
@@ -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_ */
lib/vhost/rte_vhost_crypto.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _VHOST_CRYPTO_H_ #define _VHOST_CRYPTO_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_compat.h>
@@ -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_ */
lib/vhost/vdpa_driver.h +8 -0
@@ -5,6 +5,10 @@ #ifndef _VDPA_DRIVER_H_ #define _VDPA_DRIVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> #include <rte_compat.h>
@@ -144,4 +148,8 @@ __rte_internalint rte_vdpa_relay_vring_used (int vid,uint16_t qid,void *vring_m); +#ifdef __cplusplus +} +#endif +#endif /* _VDPA_DRIVER_H_ */
Signature · 1 line
2.25.1
RE: [PATCH v2 09/11] vhost: fix missing C++ guards
Quoted 14 lines
-----Original Message-----
From: Dooley, Brian <[email protected]>
Sent: Wednesday, February 16, 2022 11:15 PM
To: [email protected]
Cc: Dooley, Brian <[email protected]>; [email protected]; [email protected]; Zhang, Roy Fan <[email protected]>; [email protected]; [email protected]; Richardson, Bruce <[email protected]>; Xia, Chenbo <[email protected]>; Jay Zhou <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v2 09/11] vhost: fix missing C++ guardsSome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Quoted 6 lines
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")
Zhihong and Patrick is no longer in intel, can delete both if there's new version
For this patch:
Quoted 15 lines
Signed-off-by Brian Dooley <[email protected]>Acked-by Bruce Richardson <[email protected]>---
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(+)
PATCH v2 10/11 bpf: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/bpf/bpf_def.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/bpf/bpf_def.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
PATCH v2 11/11 cryptodev: fix missing C++ guards
In reply to Brian DooleySome public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
---
v2: Added missing apostrophe to commit message.
--- lib/cryptodev/cryptodev_pmd.h | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/cryptodev/cryptodev_pmd.h +8 -0
@@ -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_ */
Signature · 1 line
2.25.1
Quoted 15 lines · Brian Dooley
Public header files were missing 'extern "C"' guards. This set adds them in.
Brian Dooley (11):
eal: fix missing C++ guards
telemetry: fix missing C++ guards
ethdev: fix missing C++ guards
metrics: fix missing C++ guards
acl: fix missing C++ guards
compressdev: fix missing C++ guards
eventdev: fix missing C++ guards
kni: fix missing C++ guards
vhost: fix missing C++ guards
bpf: fix missing C++ guards
cryptodev: fix missing C++ guards
Thomas Monjalon
Applied17/02/2022 09:00, Tyler Retzlaff:
Quoted 17 lines · Brian Dooley
Quoted 15 lines
Public header files were missing 'extern "C"' guards. This set adds them in.
Brian Dooley (11):
eal: fix missing C++ guards
telemetry: fix missing C++ guards
ethdev: fix missing C++ guards
metrics: fix missing C++ guards
acl: fix missing C++ guards
compressdev: fix missing C++ guards
eventdev: fix missing C++ guards
kni: fix missing C++ guards
vhost: fix missing C++ guards
bpf: fix missing C++ guards
cryptodev: fix missing C++ guards
Quoted 1 line
Series-Acked-by Tyler Retzlaff <[email protected]>
Applied, thanks.