dmadev: enable build on Windows
Checks
Commit Message
The dmadev library was not added to the list of libraries built on
Windows, meaning it was skipped in those builds and also that none of
the drivers were being considered for build. Adding dmadev to the list
fixes this, and also enables the skeleton dmadev driver to be built -
all-be-it with a small fix necessary.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
This patch has been compile tested using mingw on Linux. Sending it
publicly so that I can get CI test reports to check native windows
builds.
---
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
lib/meson.build | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
Comments
On Tue, Oct 19, 2021 at 2:28 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> The dmadev library was not added to the list of libraries built on
> Windows, meaning it was skipped in those builds and also that none of
> the drivers were being considered for build. Adding dmadev to the list
> fixes this, and also enables the skeleton dmadev driver to be built -
> all-be-it with a small fix necessary.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>
> This patch has been compile tested using mingw on Linux. Sending it
> publicly so that I can get CI test reports to check native windows
> builds.
> ---
There is a problem with exported symbols.
Some inlines have been marked for versioning (see
rte_dma_burst_capacity for example) and must be removed from
version.map.
Can you have a look?
==== 20 line log output for Windows Server 2019 (dpdk_meson_compile): ====
"clang" -Wl,/MACHINE:X64 -Wl,/OUT:lib/rte_dmadev-22.dll
lib/librte_dmadev.a.p/dmadev_rte_dmadev.c.obj "-Wl,/nologo"
"-Wl,/release" "-Wl,/nologo" "-Wl,/OPT:REF" "-Wl,/DLL"
"-Wl,/IMPLIB:lib\rte_dmadev.lib" "lib\rte_eal.lib"
"lib\rte_kvargs.lib"
"-Wl,/def:C:\Users\builder\jenkins\workspace\Windows-Compile-DPDK-Meson\dpdk\build\lib\rte_dmadev_exports.def"
"-ldbghelp" "-lsetupapi" "-lws2_32" "-lmincore" "-lkernel32"
"-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32"
"-luuid" "-lcomdlg32" "-ladvapi32"
rte_dmadev_exports.def : error LNK2001: unresolved external symbol
rte_dma_burst_capacity
rte_dmadev_exports.def : error LNK2001: unresolved external symbol
rte_dma_completed
rte_dmadev_exports.def : error LNK2001: unresolved external symbol
rte_dma_completed_status
rte_dmadev_exports.def : error LNK2001: unresolved external symbol rte_dma_copy
rte_dmadev_exports.def : error LNK2001: unresolved external symbol
rte_dma_copy_sg
rte_dmadev_exports.def : error LNK2001: unresolved external symbol rte_dma_fill
rte_dmadev_exports.def : error LNK2001: unresolved external symbol
rte_dma_submit
lib\rte_dmadev.lib : fatal error LNK1120: 7 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see
invocation)
[485/536] Linking target lib/rte_timer-22.dll
Creating library lib\rte_timer.lib and object lib\rte_timer.exp
[486/536] Linking target lib/rte_cfgfile-22.dll
Creating library lib\rte_cfgfile.lib and object lib\rte_cfgfile.exp
[487/536] Linking target lib/rte_pci-22.dll
Creating library lib\rte_pci.lib and object lib\rte_pci.exp
[488/536] Generating symbol file lib/rte_meter-22.dll.p/rte_meter-22.dll.symbols
[489/536] Generating symbol file lib/rte_ring-22.dll.p/rte_ring-22.dll.symbols
ninja: build stopped: subcommand failed.
[1] Error running command.
==== End log output ====
On 2021/10/19 20:28, Bruce Richardson wrote:
> The dmadev library was not added to the list of libraries built on
> Windows, meaning it was skipped in those builds and also that none of
> the drivers were being considered for build. Adding dmadev to the list
> fixes this, and also enables the skeleton dmadev driver to be built -
> all-be-it with a small fix necessary.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>
> This patch has been compile tested using mingw on Linux. Sending it
> publicly so that I can get CI test reports to check native windows
> builds.
> ---
> drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
> lib/meson.build | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c
> index 2952417126..d9e4f731d7 100644
> --- a/drivers/dma/skeleton/skeleton_dmadev.c
> +++ b/drivers/dma/skeleton/skeleton_dmadev.c
> @@ -153,7 +153,7 @@ skeldma_stop(struct rte_dma_dev *dev)
> hw->exit_flag = true;
> rte_delay_ms(1);
>
> - pthread_cancel(hw->thread);
> + (void)pthread_cancel(hw->thread);
> pthread_join(hw->thread, NULL);
>
> return 0;
> diff --git a/lib/meson.build b/lib/meson.build
> index 3b8b099820..403b1f4aa4 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -75,6 +75,7 @@ if is_windows
> 'net',
> 'meter',
> 'ethdev',
> + 'dmadev',
> 'pci',
> 'cmdline',
> 'metrics',
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
>
On Wed, Oct 20, 2021 at 8:32 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Tue, Oct 19, 2021 at 2:28 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > The dmadev library was not added to the list of libraries built on
> > Windows, meaning it was skipped in those builds and also that none of
> > the drivers were being considered for build. Adding dmadev to the list
> > fixes this, and also enables the skeleton dmadev driver to be built -
> > all-be-it with a small fix necessary.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >
> > This patch has been compile tested using mingw on Linux. Sending it
> > publicly so that I can get CI test reports to check native windows
> > builds.
> > ---
>
> There is a problem with exported symbols.
> Some inlines have been marked for versioning (see
> rte_dma_burst_capacity for example) and must be removed from
> version.map.
>
> Can you have a look?
I sent the patches.
Hope it saves us some time:
https://patchwork.dpdk.org/project/dpdk/patch/20211020065944.19617-2-david.marchand@redhat.com/
@@ -153,7 +153,7 @@ skeldma_stop(struct rte_dma_dev *dev)
hw->exit_flag = true;
rte_delay_ms(1);
- pthread_cancel(hw->thread);
+ (void)pthread_cancel(hw->thread);
pthread_join(hw->thread, NULL);
return 0;
@@ -75,6 +75,7 @@ if is_windows
'net',
'meter',
'ethdev',
+ 'dmadev',
'pci',
'cmdline',
'metrics',