patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Brian Dooley <brian.dooley@intel.com>
To: stable@dpdk.org
Cc: christian.ehrhardt@canonical.com,
	Brian Dooley <brian.dooley@intel.com>,
	nhorman@tuxdriver.com, thomas@monjalon.net,
	anatoly.burakov@intel.com, adrien.mazarguil@6wind.com,
	anand.rawat@intel.com,
	Bruce Richardson <bruce.richardson@intel.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Remy Horton <remy.horton@intel.com>,
	Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>
Subject: [PATCH 19.11 1/3] eal: fix missing C++ guards
Date: Tue, 15 Mar 2022 09:46:06 +0000	[thread overview]
Message-ID: <20220315094608.1199076-2-brian.dooley@intel.com> (raw)
In-Reply-To: <20220315094608.1199076-1-brian.dooley@intel.com>

[ upstream commit d7e9c02ccad8928b6b804049ced9a3ce6172d81e ]

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: 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: 428eb983f5f7 ("eal: add OS specific header file")
Cc: nhorman@tuxdriver.com
Cc: thomas@monjalon.net
Cc: anatoly.burakov@intel.com
Cc: adrien.mazarguil@6wind.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>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/common/include/rte_branch_prediction.h    | 8 ++++++++
 lib/librte_eal/common/include/rte_compat.h               | 8 ++++++++
 lib/librte_eal/common/include/rte_hypervisor.h           | 8 ++++++++
 lib/librte_eal/common/include/rte_keepalive.h            | 8 ++++++++
 lib/librte_eal/common/include/rte_pci_dev_feature_defs.h | 8 ++++++++
 lib/librte_eal/common/include/rte_pci_dev_features.h     | 8 ++++++++
 lib/librte_eal/common/include/rte_time.h                 | 8 ++++++++
 lib/librte_eal/linux/eal/include/rte_os.h                | 8 ++++++++
 8 files changed, 64 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_branch_prediction.h b/lib/librte_eal/common/include/rte_branch_prediction.h
index 854ef9e5d..0256a9de6 100644
--- a/lib/librte_eal/common/include/rte_branch_prediction.h
+++ b/lib/librte_eal/common/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/librte_eal/common/include/rte_compat.h b/lib/librte_eal/common/include/rte_compat.h
index 3eb33784b..0b8ba4353 100644
--- a/lib/librte_eal/common/include/rte_compat.h
+++ b/lib/librte_eal/common/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 \
@@ -19,4 +23,8 @@ __attribute__((section(".text.experimental")))
 
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_COMPAT_H_ */
diff --git a/lib/librte_eal/common/include/rte_hypervisor.h b/lib/librte_eal/common/include/rte_hypervisor.h
index 5fe719c1d..1666431ce 100644
--- a/lib/librte_eal/common/include/rte_hypervisor.h
+++ b/lib/librte_eal/common/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/librte_eal/common/include/rte_keepalive.h b/lib/librte_eal/common/include/rte_keepalive.h
index 4bda7ca56..cd5099295 100644
--- a/lib/librte_eal/common/include/rte_keepalive.h
+++ b/lib/librte_eal/common/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/librte_eal/common/include/rte_pci_dev_feature_defs.h b/lib/librte_eal/common/include/rte_pci_dev_feature_defs.h
index e12c22081..c5bb63128 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_feature_defs.h
+++ b/lib/librte_eal/common/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/librte_eal/common/include/rte_pci_dev_features.h b/lib/librte_eal/common/include/rte_pci_dev_features.h
index 6104123d2..ee6e10590 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_features.h
+++ b/lib/librte_eal/common/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/librte_eal/common/include/rte_time.h b/lib/librte_eal/common/include/rte_time.h
index 5ad7c8841..ec25f7b93 100644
--- a/lib/librte_eal/common/include/rte_time.h
+++ b/lib/librte_eal/common/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/librte_eal/linux/eal/include/rte_os.h b/lib/librte_eal/linux/eal/include/rte_os.h
index 390b87b3a..afa28ece9 100644
--- a/lib/librte_eal/linux/eal/include/rte_os.h
+++ b/lib/librte_eal/linux/eal/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.
@@ -29,4 +33,8 @@ typedef cpu_set_t rte_cpuset_t;
 	CPU_XOR(dst, &tmp, src); \
 } while (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_OS_H_ */
-- 
2.25.1


  reply	other threads:[~2022-03-15  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  9:46 [PATCH 19.11 0/3] add " Brian Dooley
2022-03-15  9:46 ` Brian Dooley [this message]
2022-03-15  9:46 ` [PATCH 19.11 2/3] ethdev: " Brian Dooley
2022-03-15  9:46 ` [PATCH 19.11 3/3] vhost: add missing c++ guards Brian Dooley
2022-03-17  9:00 ` [PATCH 19.11 0/3] add missing C++ guards Christian Ehrhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220315094608.1199076-2-brian.dooley@intel.com \
    --to=brian.dooley@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=anand.rawat@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nhorman@tuxdriver.com \
    --cc=pallavi.kadam@intel.com \
    --cc=remy.horton@intel.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).