patch 'gpudev: export header file for external drivers' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:24:49 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/ef700bf7d0b6e90ff72138536ba1703b76905a5e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ef700bf7d0b6e90ff72138536ba1703b76905a5e Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Thu, 16 Mar 2023 09:59:19 +0100
Subject: [PATCH] gpudev: export header file for external drivers
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5dd7c0d6956b5c016f48ec62e8c2e81f2a82e10d ]

In DPDK 21.05, the option driver_sdk_headers was introduced
to export required headers to allow building out-of-tree drivers.

In DPDK 21.11, the gpudev driver class was introduced,
without this out-of-tree compatibility.

It is fixed by exporting gpudev_driver.h as part of the driver SDK.

As a consequence of exporting this header file,
C++ "extern C" guard must be added.

Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")

Reported-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 lib/gpudev/gpudev_driver.h | 8 ++++++++
 lib/gpudev/meson.build     | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index d5e2c8e1ef..42898c7c8b 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -19,6 +19,10 @@
 #include <rte_compat.h>
 #include "rte_gpudev.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Flags indicate current state of device. */
 enum rte_gpu_state {
 	RTE_GPU_STATE_UNUSED,        /* not initialized */
@@ -106,4 +110,8 @@ int rte_gpu_release(struct rte_gpu *dev);
 __rte_internal
 void rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* RTE_GPUDEV_DRIVER_H */
diff --git a/lib/gpudev/meson.build b/lib/gpudev/meson.build
index 89a118f357..d21fadc052 100644
--- a/lib/gpudev/meson.build
+++ b/lib/gpudev/meson.build
@@ -5,6 +5,10 @@ headers = files(
         'rte_gpudev.h',
 )
 
+driver_sdk_headers = files(
+        'gpudev_driver.h',
+)
+
 sources = files(
         'gpudev.c',
 )
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.345353300 +0800
+++ 0101-gpudev-export-header-file-for-external-drivers.patch	2023-04-09 21:45:38.719042200 +0800
@@ -1 +1 @@
-From 5dd7c0d6956b5c016f48ec62e8c2e81f2a82e10d Mon Sep 17 00:00:00 2001
+From ef700bf7d0b6e90ff72138536ba1703b76905a5e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5dd7c0d6956b5c016f48ec62e8c2e81f2a82e10d ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list