DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] dmadev: enable build on Windows
@ 2021-10-19 12:28 Bruce Richardson
  2021-10-20  6:32 ` David Marchand
  2021-10-20  6:39 ` fengchengwen
  0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2021-10-19 12:28 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Chengwen Feng

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',
-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] dmadev: enable build on Windows
  2021-10-19 12:28 [dpdk-dev] [PATCH] dmadev: enable build on Windows Bruce Richardson
@ 2021-10-20  6:32 ` David Marchand
  2021-10-20  7:03   ` David Marchand
  2021-10-20  6:39 ` fengchengwen
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2021-10-20  6:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Chengwen Feng, Thomas Monjalon

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 ====


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] dmadev: enable build on Windows
  2021-10-19 12:28 [dpdk-dev] [PATCH] dmadev: enable build on Windows Bruce Richardson
  2021-10-20  6:32 ` David Marchand
@ 2021-10-20  6:39 ` fengchengwen
  1 sibling, 0 replies; 4+ messages in thread
From: fengchengwen @ 2021-10-20  6:39 UTC (permalink / raw)
  To: Bruce Richardson, dev

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>

> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] dmadev: enable build on Windows
  2021-10-20  6:32 ` David Marchand
@ 2021-10-20  7:03   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2021-10-20  7:03 UTC (permalink / raw)
  To: Bruce Richardson, Chengwen Feng; +Cc: dev, Thomas Monjalon

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/


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-20  7:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 12:28 [dpdk-dev] [PATCH] dmadev: enable build on Windows Bruce Richardson
2021-10-20  6:32 ` David Marchand
2021-10-20  7:03   ` David Marchand
2021-10-20  6:39 ` fengchengwen

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