* [PATCH 00/11] add missing C++ guards
@ 2022-02-15 17:08 Brian Dooley
2022-02-15 17:08 ` [PATCH 01/11] eal: fix " Brian Dooley
` (13 more replies)
0 siblings, 14 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: 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
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(+)
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 01/11] eal: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 02/11] telemetry: " Brian Dooley
` (12 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, joyce.kong, nhorman, thomas, anatoly.burakov,
adrien.mazarguil, jerinj, anand.rawat, stable, Ray Kinsella,
Sunil Kumar Kori, Gavin Hu, Morten Brørup, Phil Yang,
Sergio Gonzalez Monroy, Remy Horton, David Marchand,
Harini Ramakrishnan, Pallavi Kadam
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 <brian.dooley@intel.com>
---
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 <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_ */
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 <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_ */
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 <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
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 <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_ */
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 <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_ */
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 02/11] telemetry: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
2022-02-15 17:08 ` [PATCH 01/11] eal: fix " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 03/11] ethdev: " Brian Dooley
` (11 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, ciara.power, stable, Harry van Haaren,
Radu Nicolau, Kevin Laatz, Brian Archbold
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 03/11] ethdev: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
2022-02-15 17:08 ` [PATCH 01/11] eal: fix " Brian Dooley
2022-02-15 17:08 ` [PATCH 02/11] telemetry: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 04/11] metrics: " Brian Dooley
` (10 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, liang-min.wang, jblunck, ferruh.yigit, thomas,
stable, Andrew Rybchenko, Andrew Harvey, David Harton,
Konstantin Ananyev, Stephen Hemminger
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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 <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_ */
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 <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_ */
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 <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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 04/11] metrics: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (2 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 03/11] ethdev: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 05/11] acl: " Brian Dooley
` (9 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, ciara.power, stable, Keith Wiles
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 05/11] acl: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (3 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 04/11] metrics: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 06/11] compressdev: " Brian Dooley
` (8 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, konstantin.ananyev, stable, Pablo de Lara Guarch
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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 <rte_cpuflags.h>
#include <rte_debug.h>
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_ACL_OSDEP_H_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 06/11] compressdev: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (4 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 05/11] acl: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 07/11] eventdev: " Brian Dooley
` (7 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, fiona.trahe, stable, Fan Zhang, Ashish Gupta,
Pablo de Lara, Shally Verma
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 07/11] eventdev: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (5 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 06/11] compressdev: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 08/11] kni: " Brian Dooley
` (6 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, bruce.richardson, thomas, stable, Jerin Jacob,
Harry van Haaren
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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 <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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 08/11] kni: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (6 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 07/11] eventdev: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 09/11] vhost: " Brian Dooley
` (5 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, stable, Ferruh Yigit
Some public header files were missing 'extern "C"' C++ guards,
and couldnt be used by C++ applications. Add the missing guards.
Fixes: 3fc5ca2f6352 ("kni: initial import")
Cc: stable@dpdk.org
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
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 <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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 09/11] vhost: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (7 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 08/11] kni: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 10/11] bpf: " Brian Dooley
` (4 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, zhihong.wang, patrick.fu, roy.fan.zhang,
maxime.coquelin, stable, Chenbo Xia, Jay Zhou, Thomas Monjalon
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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 <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_ */
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 <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_ */
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 <stdbool.h>
#include <rte_compat.h>
@@ -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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 10/11] bpf: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (8 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 09/11] vhost: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:08 ` [PATCH 11/11] cryptodev: " Brian Dooley
` (3 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, thomas, stable, Konstantin Ananyev
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 11/11] cryptodev: fix missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (9 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 10/11] bpf: " Brian Dooley
@ 2022-02-15 17:08 ` Brian Dooley
2022-02-15 17:32 ` [PATCH 00/11] add " Bruce Richardson
` (2 subsequent siblings)
13 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-15 17:08 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, thomas, stable, Akhil Goyal, Fan Zhang
Some public header files were missing 'extern "C"' C++ guards,
and couldnt 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 <brian.dooley@intel.com>
---
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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 00/11] add missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (10 preceding siblings ...)
2022-02-15 17:08 ` [PATCH 11/11] cryptodev: " Brian Dooley
@ 2022-02-15 17:32 ` Bruce Richardson
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
2022-02-17 8:00 ` [PATCH 00/11] add " Tyler Retzlaff
13 siblings, 0 replies; 28+ messages in thread
From: Bruce Richardson @ 2022-02-15 17:32 UTC (permalink / raw)
To: Brian Dooley; +Cc: dev
On Tue, Feb 15, 2022 at 05:08:06PM +0000, Brian Dooley wrote:
> 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.
Series-Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 00/11] add missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (11 preceding siblings ...)
2022-02-15 17:32 ` [PATCH 00/11] add " Bruce Richardson
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 01/11] eal: fix " Brian Dooley
` (10 more replies)
2022-02-17 8:00 ` [PATCH 00/11] add " Tyler Retzlaff
13 siblings, 11 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley
Public 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(+)
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 01/11] eal: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 02/11] telemetry: " Brian Dooley
` (9 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, joyce.kong, nhorman, thomas, anatoly.burakov,
adrien.mazarguil, jerinj, anand.rawat, stable, Bruce Richardson,
Ray Kinsella, Sunil Kumar Kori, Phil Yang, Morten Brørup,
Gavin Hu, Sergio Gonzalez Monroy, Remy Horton, David Marchand,
Pallavi Kadam, Harini Ramakrishnan
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <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_ */
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 <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_ */
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 <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
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 <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_ */
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 <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_ */
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 02/11] telemetry: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 01/11] eal: fix " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 03/11] ethdev: " Brian Dooley
` (8 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, ciara.power, stable, Bruce Richardson,
Brian Archbold, Kevin Laatz, Radu Nicolau, Harry van Haaren
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 03/11] ethdev: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 01/11] eal: fix " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 02/11] telemetry: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 04/11] metrics: " Brian Dooley
` (7 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, liang-min.wang, jblunck, ferruh.yigit, thomas,
stable, Bruce Richardson, Andrew Rybchenko, David Harton,
Konstantin Ananyev, Andrew Harvey, Stephen Hemminger
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <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_ */
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 <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_ */
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 <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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 04/11] metrics: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (2 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 03/11] ethdev: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 05/11] acl: " Brian Dooley
` (6 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, ciara.power, stable, Bruce Richardson, Keith Wiles
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 05/11] acl: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (3 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 04/11] metrics: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 06/11] compressdev: " Brian Dooley
` (5 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, konstantin.ananyev, stable, Bruce Richardson,
Pablo de Lara Guarch
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <rte_cpuflags.h>
#include <rte_debug.h>
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_ACL_OSDEP_H_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 06/11] compressdev: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (4 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 05/11] acl: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 07/11] eventdev: " Brian Dooley
` (4 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, fiona.trahe, stable, Bruce Richardson, Fan Zhang,
Ashish Gupta, Shally Verma, Pablo de Lara
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 07/11] eventdev: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (5 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 06/11] compressdev: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 08/11] kni: " Brian Dooley
` (3 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, bruce.richardson, thomas, stable, Jerin Jacob,
Harry van Haaren
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <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
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 08/11] kni: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (6 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 07/11] eventdev: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 09/11] vhost: " Brian Dooley
` (2 subsequent siblings)
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, stable, Bruce Richardson, Ferruh Yigit
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 09/11] vhost: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (7 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 08/11] kni: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-17 7:50 ` Xia, Chenbo
2022-02-16 15:14 ` [PATCH v2 10/11] bpf: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 11/11] cryptodev: " Brian Dooley
10 siblings, 1 reply; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, zhihong.wang, patrick.fu, roy.fan.zhang,
maxime.coquelin, stable, Bruce Richardson, Chenbo Xia, Jay Zhou,
Thomas Monjalon
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 <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_ */
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 <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_ */
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 <stdbool.h>
#include <rte_compat.h>
@@ -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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 10/11] bpf: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (8 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 09/11] vhost: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
2022-02-16 15:14 ` [PATCH v2 11/11] cryptodev: " Brian Dooley
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev; +Cc: Brian Dooley, thomas, stable, Bruce Richardson, Konstantin Ananyev
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 11/11] cryptodev: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
` (9 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 10/11] bpf: " Brian Dooley
@ 2022-02-16 15:14 ` Brian Dooley
10 siblings, 0 replies; 28+ messages in thread
From: Brian Dooley @ 2022-02-16 15:14 UTC (permalink / raw)
To: dev
Cc: Brian Dooley, thomas, stable, Bruce Richardson, Akhil Goyal, Fan Zhang
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 <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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_ */
--
2.25.1
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH v2 09/11] vhost: fix missing C++ guards
2022-02-16 15:14 ` [PATCH v2 09/11] vhost: " Brian Dooley
@ 2022-02-17 7:50 ` Xia, Chenbo
0 siblings, 0 replies; 28+ messages in thread
From: Xia, Chenbo @ 2022-02-17 7:50 UTC (permalink / raw)
To: Dooley, Brian, dev
Cc: Zhang, Roy Fan, maxime.coquelin, stable, Richardson, Bruce,
Jay Zhou, Thomas Monjalon
> -----Original Message-----
> From: Dooley, Brian <brian.dooley@intel.com>
> Sent: Wednesday, February 16, 2022 11:15 PM
> To: dev@dpdk.org
> Cc: Dooley, Brian <brian.dooley@intel.com>; zhihong.wang@intel.com;
> patrick.fu@intel.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> maxime.coquelin@redhat.com; stable@dpdk.org; Richardson, Bruce
> <bruce.richardson@intel.com>; Xia, Chenbo <chenbo.xia@intel.com>; Jay Zhou
> <jianjay.zhou@huawei.com>; Thomas Monjalon <thomas@monjalon.net>
> Subject: [PATCH v2 09/11] vhost: 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.
>
> 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
Zhihong and Patrick is no longer in intel, can delete both if there's new version
For this patch:
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
> Cc: roy.fan.zhang@intel.com
> Cc: maxime.coquelin@redhat.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Brian Dooley <brian.dooley@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> ---
> 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(+)
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 00/11] add missing C++ guards
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
` (12 preceding siblings ...)
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
@ 2022-02-17 8:00 ` Tyler Retzlaff
2022-02-22 14:02 ` Thomas Monjalon
13 siblings, 1 reply; 28+ messages in thread
From: Tyler Retzlaff @ 2022-02-17 8:00 UTC (permalink / raw)
To: Brian Dooley; +Cc: dev
On Tue, Feb 15, 2022 at 05:08:06PM +0000, Brian Dooley wrote:
> 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
Series-Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 00/11] add missing C++ guards
2022-02-17 8:00 ` [PATCH 00/11] add " Tyler Retzlaff
@ 2022-02-22 14:02 ` Thomas Monjalon
0 siblings, 0 replies; 28+ messages in thread
From: Thomas Monjalon @ 2022-02-22 14:02 UTC (permalink / raw)
To: Brian Dooley; +Cc: dev, Tyler Retzlaff, bruce.richardson
17/02/2022 09:00, Tyler Retzlaff:
> On Tue, Feb 15, 2022 at 05:08:06PM +0000, Brian Dooley wrote:
> > 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
>
> Series-Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2022-02-22 14:02 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 17:08 [PATCH 00/11] add missing C++ guards Brian Dooley
2022-02-15 17:08 ` [PATCH 01/11] eal: fix " Brian Dooley
2022-02-15 17:08 ` [PATCH 02/11] telemetry: " Brian Dooley
2022-02-15 17:08 ` [PATCH 03/11] ethdev: " Brian Dooley
2022-02-15 17:08 ` [PATCH 04/11] metrics: " Brian Dooley
2022-02-15 17:08 ` [PATCH 05/11] acl: " Brian Dooley
2022-02-15 17:08 ` [PATCH 06/11] compressdev: " Brian Dooley
2022-02-15 17:08 ` [PATCH 07/11] eventdev: " Brian Dooley
2022-02-15 17:08 ` [PATCH 08/11] kni: " Brian Dooley
2022-02-15 17:08 ` [PATCH 09/11] vhost: " Brian Dooley
2022-02-15 17:08 ` [PATCH 10/11] bpf: " Brian Dooley
2022-02-15 17:08 ` [PATCH 11/11] cryptodev: " Brian Dooley
2022-02-15 17:32 ` [PATCH 00/11] add " Bruce Richardson
2022-02-16 15:14 ` [PATCH v2 " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 01/11] eal: fix " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 02/11] telemetry: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 03/11] ethdev: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 04/11] metrics: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 05/11] acl: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 06/11] compressdev: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 07/11] eventdev: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 08/11] kni: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 09/11] vhost: " Brian Dooley
2022-02-17 7:50 ` Xia, Chenbo
2022-02-16 15:14 ` [PATCH v2 10/11] bpf: " Brian Dooley
2022-02-16 15:14 ` [PATCH v2 11/11] cryptodev: " Brian Dooley
2022-02-17 8:00 ` [PATCH 00/11] add " Tyler Retzlaff
2022-02-22 14:02 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).