net/iavf: enable on Windows
Checks
Commit Message
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(-)
@@ -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
-------------
@@ -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);
@@ -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"
@@ -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"
@@ -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