patch 'vhost: add missing C++ guards' has been queued to stable release 20.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Feb 28 22:20:06 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/20baa98d62c825ed8548d74b8ae797dd8dd49ee6

Thanks.

Luca Boccassi

---
>From 20baa98d62c825ed8548d74b8ae797dd8dd49ee6 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley at intel.com>
Date: Wed, 16 Feb 2022 15:14:54 +0000
Subject: [PATCH] vhost: add missing C++ guards

[ upstream commit cedca4084a61e85323800022974c1fde5027cbb4 ]

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")

Signed-off-by: Brian Dooley <brian.dooley at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 lib/librte_vhost/rte_vdpa.h         | 9 +++++++++
 lib/librte_vhost/rte_vdpa_dev.h     | 8 ++++++++
 lib/librte_vhost/rte_vhost_crypto.h | 8 ++++++++
 3 files changed, 25 insertions(+)

diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
index 1437f400bf..6ac85d1bbf 100644
--- a/lib/librte_vhost/rte_vdpa.h
+++ b/lib/librte_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/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
index bfada387b0..52f528ff20 100644
--- a/lib/librte_vhost/rte_vdpa_dev.h
+++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -5,6 +5,10 @@
 #ifndef _RTE_VDPA_H_DEV_
 #define _RTE_VDPA_H_DEV_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdbool.h>
 
 #include "rte_vhost.h"
@@ -135,4 +139,8 @@ rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable);
 int
 rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_VDPA_DEV_H_ */
diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
index 8531757285..ef01f94aa5 100644
--- a/lib/librte_vhost/rte_vhost_crypto.h
+++ b/lib/librte_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>
@@ -137,4 +141,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_ */
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-28 21:17:54.792607141 +0000
+++ 0010-vhost-add-missing-C-guards.patch	2022-02-28 21:17:53.812928618 +0000
@@ -1 +1 @@
-From cedca4084a61e85323800022974c1fde5027cbb4 Mon Sep 17 00:00:00 2001
+From 20baa98d62c825ed8548d74b8ae797dd8dd49ee6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cedca4084a61e85323800022974c1fde5027cbb4 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -20,5 +21,4 @@
- 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/librte_vhost/rte_vdpa.h         | 9 +++++++++
+ lib/librte_vhost/rte_vdpa_dev.h     | 8 ++++++++
+ lib/librte_vhost/rte_vhost_crypto.h | 8 ++++++++
+ 3 files changed, 25 insertions(+)
@@ -26 +26 @@
-diff --git a/lib/vhost/rte_vdpa.h b/lib/vhost/rte_vdpa.h
+diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
@@ -28,2 +28,2 @@
---- a/lib/vhost/rte_vdpa.h
-+++ b/lib/vhost/rte_vdpa.h
+--- a/lib/librte_vhost/rte_vdpa.h
++++ b/lib/librte_vhost/rte_vdpa.h
@@ -51,4 +51,4 @@
-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
+diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
+index bfada387b0..52f528ff20 100644
+--- a/lib/librte_vhost/rte_vdpa_dev.h
++++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -56,2 +56,2 @@
- #ifndef _RTE_VHOST_ASYNC_H_
- #define _RTE_VHOST_ASYNC_H_
+ #ifndef _RTE_VDPA_H_DEV_
+ #define _RTE_VDPA_H_DEV_
@@ -63 +63 @@
- #include <stdint.h>
+ #include <stdbool.h>
@@ -65,4 +65,4 @@
- #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);
+ #include "rte_vhost.h"
+@@ -135,4 +139,8 @@ rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable);
+ int
+ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
@@ -74,5 +74,5 @@
- #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
+ #endif /* _RTE_VDPA_DEV_H_ */
+diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
+index 8531757285..ef01f94aa5 100644
+--- a/lib/librte_vhost/rte_vhost_crypto.h
++++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -90 +90 @@
-@@ -132,4 +136,8 @@ uint16_t
+@@ -137,4 +141,8 @@ uint16_t
@@ -99,24 +98,0 @@
-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_ */


More information about the stable mailing list