DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support
@ 2020-06-20 22:35 Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 1/3] config: never link with pthread on Windows Dmitry Kozlyuk
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-20 22:35 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, Tal Shnaiderman, Dmitry Kozlyuk

Following the discussion on the mailing list [1], clarify MinGW-w64
installation process and stop linking with pthread on Windows.
Make Meson cross-file more general along the way.

[1]: https://mails.dpdk.org/archives/dev/2020-June/170252.html

Dmitry Kozlyuk (3):
  config: never link with pthread on Windows
  config/x86: don't use absolute paths for MinGW-w64 cross toolchain
  doc/windows: clarify installation for MinGW-w64

 config/meson.build                    |  2 +-
 config/x86/meson_mingw.txt            | 12 ++++++------
 doc/guides/windows_gsg/build_dpdk.rst | 12 +++++++-----
 doc/guides/windows_gsg/run_apps.rst   |  7 +------
 4 files changed, 15 insertions(+), 18 deletions(-)

-- 
2.25.4


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

* [dpdk-dev] [PATCH 1/3] config: never link with pthread on Windows
  2020-06-20 22:35 [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Dmitry Kozlyuk
@ 2020-06-20 22:35 ` Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 2/3] config/x86: don't use absolute paths for MinGW-w64 cross toolchain Dmitry Kozlyuk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-20 22:35 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, Tal Shnaiderman, Dmitry Kozlyuk, Bruce Richardson

Even if pthread is provided by the toolchain, it is not needed for DPDK
on Windows, because internal shim is used. As a side-effect, this
enables cross-build with MinGW configured with non-POSIX thread library,
e.g. mcfgthread, which is the default on some distributions.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 config/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index d3f05f878..bb64c3bd4 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -117,7 +117,7 @@ if not is_windows
 endif
 
 # use pthreads if available for the platform
-if not is_ms_linker
+if not is_windows
 	add_project_link_arguments('-pthread', language: 'c')
 	dpdk_extra_ldflags += '-pthread'
 endif
-- 
2.25.4


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

* [dpdk-dev] [PATCH 2/3] config/x86: don't use absolute paths for MinGW-w64 cross toolchain
  2020-06-20 22:35 [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 1/3] config: never link with pthread on Windows Dmitry Kozlyuk
@ 2020-06-20 22:35 ` Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 3/3] doc/windows: clarify installation for MinGW-w64 Dmitry Kozlyuk
  2020-06-22 20:51 ` [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Kadam, Pallavi
  3 siblings, 0 replies; 6+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-20 22:35 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, Tal Shnaiderman, Dmitry Kozlyuk, Bruce Richardson

Absolute paths in Meson cross-file impose unnecessary limitation
on build environment, remove them.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 config/x86/meson_mingw.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/config/x86/meson_mingw.txt b/config/x86/meson_mingw.txt
index fac33cfcd..4c15a7fa2 100644
--- a/config/x86/meson_mingw.txt
+++ b/config/x86/meson_mingw.txt
@@ -1,10 +1,10 @@
 [binaries]
-c = '/usr/bin/x86_64-w64-mingw32-gcc'
-cpp = '/usr/bin/x86_64-w64-mingw32-g++'
-ld = '/usr/bin/x86_64-w64-mingw32-ld'
-ar = '/usr/bin/x86_64-w64-mingw32-ar'
-strip = '/usr/bin/x86_64-w64-mingw32-strip'
-pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
+c = 'x86_64-w64-mingw32-gcc'
+cpp = 'x86_64-w64-mingw32-g++'
+ld = 'x86_64-w64-mingw32-ld'
+ar = 'x86_64-w64-mingw32-ar'
+strip = 'x86_64-w64-mingw32-strip'
+pkgconfig = 'x86_64-w64-mingw32-pkg-config'
 
 [host_machine]
 system = 'windows'
-- 
2.25.4


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

* [dpdk-dev] [PATCH 3/3] doc/windows: clarify installation for MinGW-w64
  2020-06-20 22:35 [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 1/3] config: never link with pthread on Windows Dmitry Kozlyuk
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 2/3] config/x86: don't use absolute paths for MinGW-w64 cross toolchain Dmitry Kozlyuk
@ 2020-06-20 22:35 ` Dmitry Kozlyuk
  2020-06-22 20:51 ` [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Kadam, Pallavi
  3 siblings, 0 replies; 6+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-20 22:35 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, Tal Shnaiderman, Dmitry Kozlyuk

Provide a more direct link for installer download and clarify thread
model choice during installation. As pthread is not a requirement,
remove notice about its possible runtime dependency.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/guides/windows_gsg/build_dpdk.rst | 12 +++++++-----
 doc/guides/windows_gsg/run_apps.rst   |  7 +------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst
index 650483e3b..5757446cc 100644
--- a/doc/guides/windows_gsg/build_dpdk.rst
+++ b/doc/guides/windows_gsg/build_dpdk.rst
@@ -44,14 +44,16 @@ and ensure the Windows SDK is selected.
 Option 2. MinGW-w64 Toolchain
 -----------------------------
 
-Obtain the latest version from
-`MinGW-w64 website <http://mingw-w64.org/doku.php/download>`_.
-On Windows, install to a folder without spaces in its name, like ``C:\MinGW``.
-This path is assumed for the rest of this guide.
-
+On Linux, i.e. for cross-compilation, install MinGW-w64 via a package manager.
 Version 4.0.4 for Ubuntu 16.04 cannot be used due to a
 `MinGW-w64 bug <https://sourceforge.net/p/mingw-w64/bugs/562/>`_.
 
+On Windows, obtain the latest version installer from
+`MinGW-w64 repository <https://sourceforge.net/projects/mingw-w64/files/>`_.
+Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on it.
+Install to a folder without spaces in its name, like ``C:\MinGW``.
+This path is assumed for the rest of this guide.
+
 
 Install the Build System
 ------------------------
diff --git a/doc/guides/windows_gsg/run_apps.rst b/doc/guides/windows_gsg/run_apps.rst
index 78e5a614f..abaecc379 100644
--- a/doc/guides/windows_gsg/run_apps.rst
+++ b/doc/guides/windows_gsg/run_apps.rst
@@ -83,13 +83,8 @@ Navigate to the examples in the build directory and run `dpdk-helloworld.exe`.
 .. code-block:: console
 
     cd C:\Users\me\dpdk\build\examples
-    dpdk-helloworld.exe
+    dpdk-helloworld.exe -l 0-3
     hello from core 1
     hello from core 3
     hello from core 0
     hello from core 2
-
-Note for MinGW-w64: applications are linked to ``libwinpthread-1.dll``
-by default. To run the example, either add toolchain executables directory
-to the PATH or copy the library to the working directory.
-Alternatively, static linking may be used (mind the LGPLv2.1 license).
-- 
2.25.4


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

* Re: [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support
  2020-06-20 22:35 [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Dmitry Kozlyuk
                   ` (2 preceding siblings ...)
  2020-06-20 22:35 ` [dpdk-dev] [PATCH 3/3] doc/windows: clarify installation for MinGW-w64 Dmitry Kozlyuk
@ 2020-06-22 20:51 ` Kadam, Pallavi
  2020-06-23 14:44   ` Thomas Monjalon
  3 siblings, 1 reply; 6+ messages in thread
From: Kadam, Pallavi @ 2020-06-22 20:51 UTC (permalink / raw)
  To: dev, Dmitry Kozlyuk



On 6/20/2020 3:35 PM, Dmitry Kozlyuk wrote:
> Following the discussion on the mailing list [1], clarify MinGW-w64
> installation process and stop linking with pthread on Windows.
> Make Meson cross-file more general along the way.
> 
> [1]: https://mails.dpdk.org/archives/dev/2020-June/170252.html
> 
> Dmitry Kozlyuk (3):
>    config: never link with pthread on Windows
>    config/x86: don't use absolute paths for MinGW-w64 cross toolchain
>    doc/windows: clarify installation for MinGW-w64
> 
>   config/meson.build                    |  2 +-
>   config/x86/meson_mingw.txt            | 12 ++++++------
>   doc/guides/windows_gsg/build_dpdk.rst | 12 +++++++-----
>   doc/guides/windows_gsg/run_apps.rst   |  7 +------
>   4 files changed, 15 insertions(+), 18 deletions(-)
> 
Nice to have a direct link to install MinGW on Windows.

Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>

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

* Re: [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support
  2020-06-22 20:51 ` [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Kadam, Pallavi
@ 2020-06-23 14:44   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2020-06-23 14:44 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dev, Kadam, Pallavi

22/06/2020 22:51, Kadam, Pallavi:
> On 6/20/2020 3:35 PM, Dmitry Kozlyuk wrote:
> > Following the discussion on the mailing list [1], clarify MinGW-w64
> > installation process and stop linking with pthread on Windows.
> > Make Meson cross-file more general along the way.
> > 
> > [1]: https://mails.dpdk.org/archives/dev/2020-June/170252.html
> > 
> > Dmitry Kozlyuk (3):
> >    config: never link with pthread on Windows
> >    config/x86: don't use absolute paths for MinGW-w64 cross toolchain
> >    doc/windows: clarify installation for MinGW-w64
> > 
> >   config/meson.build                    |  2 +-
> >   config/x86/meson_mingw.txt            | 12 ++++++------
> >   doc/guides/windows_gsg/build_dpdk.rst | 12 +++++++-----
> >   doc/guides/windows_gsg/run_apps.rst   |  7 +------
> >   4 files changed, 15 insertions(+), 18 deletions(-)
> > 
> Nice to have a direct link to install MinGW on Windows.
> 
> Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>

Applied, thanks




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

end of thread, other threads:[~2020-06-23 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 22:35 [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Dmitry Kozlyuk
2020-06-20 22:35 ` [dpdk-dev] [PATCH 1/3] config: never link with pthread on Windows Dmitry Kozlyuk
2020-06-20 22:35 ` [dpdk-dev] [PATCH 2/3] config/x86: don't use absolute paths for MinGW-w64 cross toolchain Dmitry Kozlyuk
2020-06-20 22:35 ` [dpdk-dev] [PATCH 3/3] doc/windows: clarify installation for MinGW-w64 Dmitry Kozlyuk
2020-06-22 20:51 ` [dpdk-dev] [PATCH 0/3] improve MinGW-w64 support Kadam, Pallavi
2020-06-23 14:44   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git