gpudev: export header file for external drivers

Message ID 20230316085919.46500-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series gpudev: export header file for external drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build fail github build: failed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional fail Functional issues

Commit Message

Thomas Monjalon March 16, 2023, 8:59 a.m. UTC
  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.

Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/gpudev/meson.build | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

David Marchand March 16, 2023, 9:23 a.m. UTC | #1
On Thu, Mar 16, 2023 at 9:59 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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.
>
> Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
> Cc: stable@dpdk.org
>
> Reported-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

LGTM, thanks.
  
Thomas Monjalon March 19, 2023, 10:28 p.m. UTC | #2
16/03/2023 10:23, David Marchand:
> On Thu, Mar 16, 2023 at 9:59 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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.
> >
> > Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
> > Cc: stable@dpdk.org
> >
> > Reported-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> LGTM, thanks.

Applied
  
Thomas Monjalon March 19, 2023, 10:43 p.m. UTC | #3
19/03/2023 23:28, Thomas Monjalon:
> 16/03/2023 10:23, David Marchand:
> > On Thu, Mar 16, 2023 at 9:59 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > >
> > > 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.
> > >
> > > Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: David Marchand <david.marchand@redhat.com>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > LGTM, thanks.
> 
> Applied

Forgot to send the v2 merged with this addition:
"
    As a consequence of exporting this header file,
    C++ "extern C" guard must be added.
"
  

Patch

diff --git a/lib/gpudev/meson.build b/lib/gpudev/meson.build
index 89a118f357..40dd6c0ffc 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',
 )