From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 706D7A0547; Thu, 9 Sep 2021 23:27:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 731DE410FC; Thu, 9 Sep 2021 23:26:59 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 1B88F4003E for ; Thu, 9 Sep 2021 23:26:56 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A2FAAwDoejph/0HRBwpagmKDIoFClVKcDhSBaAsBAQEBA?= =?us-ascii?q?QEBAQEJLRQEAQEEA4RsAoI/JzQJDgECBAEBAQEDAgMBAQEBAQEDAQEBBQEBA?= =?us-ascii?q?QEBAQUCAQEBAQKBIIUvOQ2CNSKBUgEBAQEBAQEBAQEBAQEBIisCgUYGJwsBR?= =?us-ascii?q?hBRVxmCcQG1SDKBAogUgWOBOokHhHU3gVVEgRWBPIIshAeGOASHXwF6FEKBf?= =?us-ascii?q?ZF+gyKLdJxyLQeDLoExBguIfpQFGjGFLqFXthCBHoRGgWGCFTMaI4M5CUgZD?= =?us-ascii?q?5E0i1xUOAIGCwEBAwmQdwEB?= IronPort-PHdr: A9a23:rNVPPRcjvALQ/IXDEgJAUiFxlGM+/N7LVj580XLHo4xHfqnrxZn+J kuXvawr0AWRG9yAurkd1ruempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yN s1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffRlEiCCgbb58K Bi6ohjdu8kSjIB/Nqs/1xzFr2dSde9L321oP1WTnxj95se04pFu9jlbtuwi+cBdT6j0Zrw0Q rNEAjsoNWA1/9DrugLYTQST/HscU34ZnQRODgPY8Rz1RJbxsi/9tupgxCmXOND9QL4oVTi+6 apgVRnlgzoFOTEk6mHaksx+grxGrhyvpBJxxIzbYI+aO/RxZa7RYdAXSHBdUstLSyBNHoWxZ JYPAeobOuZYqpHwqUEUohu6AQmjHv3vyj5VjXHzx6I1zv4uEQTb1wEnB9IBqnDUrNHvO6cMU OC51qrIwi/eYPxM3Dfw84nIchY9of6SWbJ8a9beyU4qFw7ciFibtIPqMS+P2OsXr2ib8/RvV fipi2M/tQ18vCWiytsth4XXm48YylTJ+Ct7zYg6O9G1VE51bNC4HZZRtCyXNYR4T8E/Tmxpu Cg3yKEKt56lcCUIy5kpxxjSYOGEfYiQ+h/vSfqdLS16iX5/Zr6zmxK//VKhx+D8UMS/zUxEo TBfktbWs3AAzxnT6s+aRfRj5kqhwjOP1xzL6uFDPEA0ibLXK54/zb40kZoeqUPDHjXtmEXzg 6+ZbFko9vSr5uj9YLXmqIWQN45yigHiLKsuntazDvg/MggLR2Sb+OK826P//UDhXblGkuc6n 6vDvJzEOcgWorS1Dg5V34o77hawFTam0NAWnXkdK1JFfQqKj5DzNFHKJPD3F+m/g1W2nDdo3 f/JI6fuApDWI3jClrfhYahy60pGxAUvytBf4opYCqsdL/LrRk/xqNvYAwckPAOq3ebqE8hy1 psDVmKMGKOZN7nSsVDbrt4oduWBeqcZoDr+bf8/6K3Al3g8zGcUea2gw5pfS3m0F/Eud12QZ X7lnNZHEm4Gtw8WTer2hVnEWjlWMSXhF5kg7y02Xdr1RbzIQZqg1eTp4Q== IronPort-HdrOrdr: A9a23:XmUCOqyJs+nRIx7gylEtKrPwL71zdoMgy1knxilNoNJuHPBw8P re+sjzuiWVtN98Yh0dcJW7Scy9qBDnhPlICPcqTNSftWDd0QPEEGgh1/qH/9SKIUzDH4Bmup uINJIUNDT3NzJHZL7BkWuFL+o= X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="243229671" X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="243229671" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 14:26:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="479853156" Received: from win-kgkr85lv27f.jf.intel.com (HELO localhost.localdomain) ([10.166.188.124]) by orsmga008.jf.intel.com with ESMTP; 09 Sep 2021 14:26:54 -0700 From: Pallavi Kadam To: dev@dpdk.org Cc: thomas@monjalon.net, qi.z.zhang@intel.com, fady@mellanox.com, Narcisa.Vasile@microsoft.com, dmitry.kozliuk@gmail.com, ferruh.yigit@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, ranjit.menon@intel.com, shivanshu.shukla@intel.com, pallavi.kadam@intel.com Date: Thu, 9 Sep 2021 16:23:19 -0700 Message-Id: <20210909232321.5091-2-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210909232321.5091-1-pallavi.kadam@intel.com> References: <20210909200533.3747-1-pallavi.kadam@intel.com> <20210909232321.5091-1-pallavi.kadam@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/3] net/iavf: build 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" - Enable IAVF PMD build 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 Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- 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/iavf_tm.c | 2 +- drivers/net/iavf/meson.build | 9 ++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index b3bd078111..55b20a80af 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -335,7 +335,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 475070e036..96c05d9319 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 571161c0cd..cb0b057b0f 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/iavf_tm.c b/drivers/net/iavf/iavf_tm.c index 3c80276ff3..8d92062c7f 100644 --- a/drivers/net/iavf/iavf_tm.c +++ b/drivers/net/iavf/iavf_tm.c @@ -321,7 +321,7 @@ iavf_tm_node_add(struct rte_eth_dev *dev, uint32_t node_id, } /* check level */ if (level_id != RTE_TM_NODE_LEVEL_ID_ANY && - level_id != parent_node_type + 1) { + level_id != (uint32_t)parent_node_type + 1) { error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS; error->message = "Wrong level"; return -EINVAL; diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index f2010a8337..36a82e3faa 100644 --- a/drivers/net/iavf/meson.build +++ b/drivers/net/iavf/meson.build @@ -1,11 +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'] @@ -25,6 +20,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.31.1.windows.1