DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pallavi Kadam <pallavi.kadam@intel.com>
To: dev@dpdk.org, thomas@monjalon.net
Cc: ranjit.menon@intel.com, navasile@linux.microsoft.com,
	jingjing.wu@intel.com, beilei.xing@intel.com,
	ferruh.yigit@intel.com, pallavi.kadam@intel.com
Subject: [dpdk-dev] [PATCH] net/iavf: enable on Windows
Date: Fri, 28 May 2021 16:08:38 -0700	[thread overview]
Message-ID: <20210528230838.10620-1-pallavi.kadam@intel.com> (raw)

This patch enables building the iAVF PMD on Windows.
- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting
  types
- Fix for pointer and integer sign warnings using Clang compiler on
  Windows
- Add extra cflags '-fno-asynchronous-unwind-tables'
  to avoid MinGW build error:
  Error: invalid register for .seh_savexmm
- Update release notes

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
 doc/guides/rel_notes/release_21_08.rst  |  4 ++++
 drivers/net/iavf/iavf.h                 |  3 ++-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   |  2 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |  2 +-
 drivers/net/iavf/meson.build            | 10 ++++------
 5 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst
index a6ecfdf3c..931f5c322 100644
--- a/doc/guides/rel_notes/release_21_08.rst
+++ b/doc/guides/rel_notes/release_21_08.rst
@@ -55,6 +55,10 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Updated Intel iavf driver.**
+
+  * Added Intel iavf support on Windows.
+
 
 Removed Items
 -------------
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 4f5811ae8..9b46608b6 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -286,7 +286,8 @@ _clear_cmd(struct iavf_info *vf)
 static inline int
 _atomic_set_cmd(struct iavf_info *vf, enum virtchnl_ops ops)
 {
-	int ret = rte_atomic32_cmpset(&vf->pend_cmd, VIRTCHNL_OP_UNKNOWN, ops);
+	int ret = rte_atomic32_cmpset((volatile uint32_t *)&vf->pend_cmd,
+		VIRTCHNL_OP_UNKNOWN, ops);
 
 	if (!ret)
 		PMD_DRV_LOG(ERR, "There is incomplete cmd %d", vf->pend_cmd);
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index f5646d645..60ff3e356 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index d99de2a8b..8669a71ba 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -4,7 +4,7 @@
 
 #include "iavf_rxtx_vec_common.h"
 
-#include <x86intrin.h>
+#include <rte_vect.h>
 
 #ifndef __INTEL_COMPILER
 #pragma GCC diagnostic ignored "-Wcast-qual"
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 6f222a9e8..a6baa77ce 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -1,12 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
-
 cflags += ['-Wno-strict-aliasing']
 
 includes += include_directories('../../common/iavf')
@@ -24,6 +18,10 @@ sources = files(
 if arch_subdir == 'x86'
     sources += files('iavf_rxtx_vec_sse.c')
 
+    if is_windows and cc.get_id() != 'clang'
+        cflags += ['-fno-asynchronous-unwind-tables']
+    endif
+
     # compile AVX2 version if either:
     # a. we have AVX supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler
-- 
2.18.0.windows.1


             reply	other threads:[~2021-05-28 22:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 23:08 Pallavi Kadam [this message]
2021-09-09 20:05 ` [dpdk-dev] [PATCH v2 0/3] Support iavf PMD " Pallavi Kadam
2021-09-09 20:05   ` [dpdk-dev] [PATCH v2 1/3] net/iavf: build " Pallavi Kadam
2021-09-09 20:05   ` [dpdk-dev] [PATCH v2 2/3] lib/net: fix support of random Pallavi Kadam
2021-09-09 20:05   ` [dpdk-dev] [PATCH v2 3/3] doc: update iavf PMD and 21.11 release notes Pallavi Kadam
2021-09-09 23:23   ` [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows Pallavi Kadam
2021-09-09 23:23     ` [dpdk-dev] [PATCH v3 1/3] net/iavf: build " Pallavi Kadam
2021-09-22 20:58       ` Shukla, Shivanshu
2021-09-09 23:23     ` [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random Pallavi Kadam
2021-09-22 21:00       ` Shukla, Shivanshu
2021-09-30 16:46       ` Thomas Monjalon
2021-09-30 22:36         ` Kadam, Pallavi
2021-09-09 23:23     ` [dpdk-dev] [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes Pallavi Kadam
2021-09-22 21:01       ` Shukla, Shivanshu
2021-09-30 16:49       ` Thomas Monjalon
2021-09-30 19:07       ` Thomas Monjalon
2021-09-22 20:56     ` [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows Shukla, Shivanshu
2021-09-22 20:58     ` Shukla, Shivanshu
2021-09-27 21:33     ` Shukla, Shivanshu
2021-09-30 20:15     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210528230838.10620-1-pallavi.kadam@intel.com \
    --to=pallavi.kadam@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=navasile@linux.microsoft.com \
    --cc=ranjit.menon@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).