DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] make dpdk buildable with latest msvc
@ 2023-10-17 13:13 Tyler Retzlaff
  2023-10-17 13:13 ` [PATCH 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:13 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

This series makes some minor temporary modifications to the MSVC build
to allow DPDK to be buildable. The changes are only temporary to allow
Windows/MSVC CI pipeline to be established.

Warnings will be made clean in a future series and avoidance of STDC
atomics check will be removed when the publicly available compiler is
formally released.

With this series applied you can do the following from a
"Developer Command Prompt for VS 2022 Preview" with
Visual Studio 17.8.0 Preview 3.0 installed.

  meson setup --werror -Denable_stdatomic=true b
  meson compile -C b

Tyler Retzlaff (2):
  build: temporarily disable MSVC warnings
  eal: temporarily disable standard c atomics support for MSVC

 config/meson.build              | 3 +++
 lib/eal/include/rte_stdatomic.h | 2 ++
 2 files changed, 5 insertions(+)

-- 
1.8.3.1


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

* [PATCH 1/2] build: temporarily disable MSVC warnings
  2023-10-17 13:13 [PATCH 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
@ 2023-10-17 13:13 ` Tyler Retzlaff
  2023-10-17 13:31   ` Bruce Richardson
  2023-10-17 13:13 ` [PATCH 2/2] eal: temporarily disable standard c atomics support for MSVC Tyler Retzlaff
  2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2 siblings, 1 reply; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:13 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

Temporarily disable integer truncation and conversion warnings for MSVC
to allow CI pipeline to be established.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 config/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index d56b0f9..6e8320e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -36,6 +36,9 @@ if is_ms_compiler
     # the MSVC compiler regards as unsafe but are used by DPDK
     dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1)
 
+    # temporarily disable msvc specific warnings
+    add_project_arguments('/wd4244', '/wd4267', language: 'c')
+
     # enable non-locking atomic operations
     add_project_arguments('/experimental:c11atomics', language: 'c')
 
-- 
1.8.3.1


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

* [PATCH 2/2] eal: temporarily disable standard c atomics support for MSVC
  2023-10-17 13:13 [PATCH 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2023-10-17 13:13 ` [PATCH 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
@ 2023-10-17 13:13 ` Tyler Retzlaff
  2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2 siblings, 0 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:13 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

MSVC will define __STDC_NO_ATOMICS__ until versions of the compiler that
support atomics is released. Currently we use the Preview version of the
compiler so skip the test of __STDC_NO_ATOMICS__ avoiding failure.

This is a temporary change until the required compiler is released
publicly but allows us to establish the MSVC CI pipeline.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/rte_stdatomic.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/eal/include/rte_stdatomic.h b/lib/eal/include/rte_stdatomic.h
index 8579e2d..7a081cb 100644
--- a/lib/eal/include/rte_stdatomic.h
+++ b/lib/eal/include/rte_stdatomic.h
@@ -12,9 +12,11 @@
 #endif
 
 #ifdef RTE_ENABLE_STDATOMIC
+#ifndef _MSC_VER
 #ifdef __STDC_NO_ATOMICS__
 #error enable_stdatomic=true but atomics not supported by toolchain
 #endif
+#endif
 
 #include <stdatomic.h>
 
-- 
1.8.3.1


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

* Re: [PATCH 1/2] build: temporarily disable MSVC warnings
  2023-10-17 13:13 ` [PATCH 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
@ 2023-10-17 13:31   ` Bruce Richardson
  0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2023-10-17 13:31 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, david.marchand

On Tue, Oct 17, 2023 at 06:13:46AM -0700, Tyler Retzlaff wrote:
> Temporarily disable integer truncation and conversion warnings for MSVC
> to allow CI pipeline to be established.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  config/meson.build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/config/meson.build b/config/meson.build
> index d56b0f9..6e8320e 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -36,6 +36,9 @@ if is_ms_compiler
>      # the MSVC compiler regards as unsafe but are used by DPDK
>      dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1)
>  
> +    # temporarily disable msvc specific warnings
> +    add_project_arguments('/wd4244', '/wd4267', language: 'c')
> +

Please add a comment line above indicating what the warning is being
disabled, e.g. unsigned compare warning etc.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* [PATCH v2 0/2] make dpdk buildable with latest msvc
  2023-10-17 13:13 [PATCH 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2023-10-17 13:13 ` [PATCH 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
  2023-10-17 13:13 ` [PATCH 2/2] eal: temporarily disable standard c atomics support for MSVC Tyler Retzlaff
@ 2023-10-17 13:49 ` Tyler Retzlaff
  2023-10-17 13:49   ` [PATCH v2 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
                     ` (2 more replies)
  2 siblings, 3 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:49 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

This series makes some minor temporary modifications to the MSVC build
to allow DPDK to be buildable. The changes are only temporary to allow
Windows/MSVC CI pipeline to be established.

Warnings will be made clean in a future series and avoidance of STDC
atomics check will be removed when the publicly available compiler is
formally released.

With this series applied you can do the following from a
"Developer Command Prompt for VS 2022 Preview" with
Visual Studio 17.8.0 Preview 3.0 installed.

  meson setup --werror -Denable_stdatomic=true b
  meson compile -C b

v2:
    * provide comments indicating which warnings are being disabled

Tyler Retzlaff (2):
  build: temporarily disable MSVC warnings
  eal: disable standard c atomics support check for MSVC

 config/meson.build              | 5 +++++
 lib/eal/include/rte_stdatomic.h | 2 ++
 2 files changed, 7 insertions(+)

-- 
1.8.3.1


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

* [PATCH v2 1/2] build: temporarily disable MSVC warnings
  2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
@ 2023-10-17 13:49   ` Tyler Retzlaff
  2023-10-17 13:49   ` [PATCH v2 2/2] eal: disable standard c atomics support check for MSVC Tyler Retzlaff
  2023-10-31 18:39   ` [PATCH v2 0/2] make dpdk buildable with latest msvc David Marchand
  2 siblings, 0 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:49 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

Temporarily disable integer truncation and conversion warnings for MSVC
to allow CI pipeline to be established.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index d56b0f9..0968351 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -36,6 +36,11 @@ if is_ms_compiler
     # the MSVC compiler regards as unsafe but are used by DPDK
     dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1)
 
+    # temporarily disable msvc specific warnings
+    # - 4244 compiler detected conversion of integer to smaller type
+    # - 4267 compiler detected conversion of size_t to smaller type
+    add_project_arguments('/wd4244', '/wd4267', language: 'c')
+
     # enable non-locking atomic operations
     add_project_arguments('/experimental:c11atomics', language: 'c')
 
-- 
1.8.3.1


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

* [PATCH v2 2/2] eal: disable standard c atomics support check for MSVC
  2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2023-10-17 13:49   ` [PATCH v2 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
@ 2023-10-17 13:49   ` Tyler Retzlaff
  2023-10-31 18:39   ` [PATCH v2 0/2] make dpdk buildable with latest msvc David Marchand
  2 siblings, 0 replies; 8+ messages in thread
From: Tyler Retzlaff @ 2023-10-17 13:49 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson, Tyler Retzlaff

MSVC will define __STDC_NO_ATOMICS__ until versions of the compiler that
support atomics is released. Currently we use the Preview version of the
compiler so skip the test of __STDC_NO_ATOMICS__ avoiding failure.

This is a temporary change until the required compiler is released
publicly but allows us to establish the MSVC CI pipeline.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/rte_stdatomic.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/eal/include/rte_stdatomic.h b/lib/eal/include/rte_stdatomic.h
index 8579e2d..7a081cb 100644
--- a/lib/eal/include/rte_stdatomic.h
+++ b/lib/eal/include/rte_stdatomic.h
@@ -12,9 +12,11 @@
 #endif
 
 #ifdef RTE_ENABLE_STDATOMIC
+#ifndef _MSC_VER
 #ifdef __STDC_NO_ATOMICS__
 #error enable_stdatomic=true but atomics not supported by toolchain
 #endif
+#endif
 
 #include <stdatomic.h>
 
-- 
1.8.3.1


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

* Re: [PATCH v2 0/2] make dpdk buildable with latest msvc
  2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
  2023-10-17 13:49   ` [PATCH v2 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
  2023-10-17 13:49   ` [PATCH v2 2/2] eal: disable standard c atomics support check for MSVC Tyler Retzlaff
@ 2023-10-31 18:39   ` David Marchand
  2 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2023-10-31 18:39 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, Bruce Richardson

On Tue, Oct 17, 2023 at 3:49 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> This series makes some minor temporary modifications to the MSVC build
> to allow DPDK to be buildable. The changes are only temporary to allow
> Windows/MSVC CI pipeline to be established.
>
> Warnings will be made clean in a future series and avoidance of STDC
> atomics check will be removed when the publicly available compiler is
> formally released.
>
> With this series applied you can do the following from a
> "Developer Command Prompt for VS 2022 Preview" with
> Visual Studio 17.8.0 Preview 3.0 installed.
>
>   meson setup --werror -Denable_stdatomic=true b
>   meson compile -C b
>
> v2:
>     * provide comments indicating which warnings are being disabled
>
> Tyler Retzlaff (2):
>   build: temporarily disable MSVC warnings
>   eal: disable standard c atomics support check for MSVC
>
>  config/meson.build              | 5 +++++
>  lib/eal/include/rte_stdatomic.h | 2 ++
>  2 files changed, 7 insertions(+)
>

Series applied, thanks.


-- 
David Marchand


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

end of thread, other threads:[~2023-10-31 18:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 13:13 [PATCH 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
2023-10-17 13:13 ` [PATCH 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
2023-10-17 13:31   ` Bruce Richardson
2023-10-17 13:13 ` [PATCH 2/2] eal: temporarily disable standard c atomics support for MSVC Tyler Retzlaff
2023-10-17 13:49 ` [PATCH v2 0/2] make dpdk buildable with latest msvc Tyler Retzlaff
2023-10-17 13:49   ` [PATCH v2 1/2] build: temporarily disable MSVC warnings Tyler Retzlaff
2023-10-17 13:49   ` [PATCH v2 2/2] eal: disable standard c atomics support check for MSVC Tyler Retzlaff
2023-10-31 18:39   ` [PATCH v2 0/2] make dpdk buildable with latest msvc David Marchand

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