From patchwork Fri May 28 23:08:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kadam, Pallavi" X-Patchwork-Id: 93548 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DE63A0547; Sat, 29 May 2021 00:38:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CB1E40141; Sat, 29 May 2021 00:38:16 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F171C40040 for ; Sat, 29 May 2021 00:38:14 +0200 (CEST) IronPort-SDR: QF6gNRRPG2vKNDPLQj1Nz7WZVhKBRwdit20bbksALoxnrTIAlopm9MFrxcGcCg7QzaC+4e2+0i 6d1zM343fU1A== X-IronPort-AV: E=McAfee;i="6200,9189,9998"; a="190163918" X-IronPort-AV: E=Sophos;i="5.83,231,1616482800"; d="scan'208";a="190163918" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2021 15:38:13 -0700 IronPort-SDR: olPBplu65Tt8qHfuF71ml4BtBxdi9ib8U2lJI1fV0MCqYyZjtUEDDz0bdXbU+B3jGV5IIcv2oO HkV/9bHo06fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,231,1616482800"; d="scan'208";a="478096467" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by orsmga001.jf.intel.com with ESMTP; 28 May 2021 15:38:13 -0700 From: Pallavi Kadam 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 Date: Fri, 28 May 2021 16:08:38 -0700 Message-Id: <20210528230838.10620-1-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [dpdk-dev] [PATCH] net/iavf: enable on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Ranjit Menon --- 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 +#include #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 +#include #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 -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