From patchwork Fri Apr 2 01:26:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kadam, Pallavi" X-Patchwork-Id: 90439 X-Patchwork-Delegate: ferruh.yigit@amd.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 77199A0548; Fri, 2 Apr 2021 02:55:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B18D141022; Fri, 2 Apr 2021 02:54:53 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D281114100E for ; Fri, 2 Apr 2021 02:54:50 +0200 (CEST) IronPort-SDR: 0C4kYLdMDuUjlsyAKe6/BcvLOXOQCBikimiAjDJFSCJIZwZURidVqwZVp41J3ghrwNx5w8DUvA VcuPGV0PSFUA== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="172394107" X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="172394107" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 17:54:43 -0700 IronPort-SDR: IbhkYjEQJDIo3jHzKYa5DQ8LSUpqQ0K4MD7qbSDH10N0Xm3oSkBBEQk7ArkYBLRHTeHgfkqBIV 4PSzAfPNUXVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="412947668" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2021 17:54:40 -0700 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com, pallavi.kadam@intel.com Date: Thu, 1 Apr 2021 18:26:19 -0700 Message-Id: <20210402012621.7944-2-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20210402012621.7944-1-pallavi.kadam@intel.com> References: <20210311015848.4976-1-pallavi.kadam@intel.com> <20210402012621.7944-1-pallavi.kadam@intel.com> Subject: [dpdk-dev] [PATCH v3 1/3] build: enable iavf base code to 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 driver to build on Windows as it is required to build ice PMD. Disable all other drivers from common directory. This patch also includes fix for a macro redefinition warning in the IAVF driver. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon Acked-by: Jie Zhou --- drivers/common/cpt/meson.build | 6 ++++++ drivers/common/iavf/iavf_osdep.h | 9 +++++++++ drivers/common/meson.build | 3 --- drivers/common/mvep/meson.build | 6 ++++++ drivers/common/octeontx/meson.build | 6 ++++++ drivers/common/octeontx2/meson.build | 6 ++++++ drivers/common/qat/meson.build | 6 ++++++ 7 files changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/common/cpt/meson.build b/drivers/common/cpt/meson.build index beecf0da3..1127267ba 100644 --- a/drivers/common/cpt/meson.build +++ b/drivers/common/cpt/meson.build @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium, Inc +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + sources = files('cpt_fpm_tables.c', 'cpt_pmd_ops_helper.c') diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/common/iavf/iavf_osdep.h index eaefde88e..76c186a5b 100644 --- a/drivers/common/iavf/iavf_osdep.h +++ b/drivers/common/iavf/iavf_osdep.h @@ -55,6 +55,15 @@ typedef uint64_t s64; #define __be64 uint64_t #endif +/* Avoid macro redefinition warning on Windows */ +#ifdef RTE_EXEC_ENV_WINDOWS +#ifdef min +#undef min +#endif +#ifdef max +#undef max +#endif +#endif #define min(a, b) RTE_MIN(a, b) #define max(a, b) RTE_MAX(a, b) diff --git a/drivers/common/meson.build b/drivers/common/meson.build index 66e12143b..438302e76 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -1,9 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Cavium, Inc -if is_windows - subdir_done() -endif std_deps = ['eal'] drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2'] diff --git a/drivers/common/mvep/meson.build b/drivers/common/mvep/meson.build index 7cd968b38..a929e2311 100644 --- a/drivers/common/mvep/meson.build +++ b/drivers/common/mvep/meson.build @@ -4,6 +4,12 @@ # All rights reserved. # +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + dep = dependency('libmusdk', required: false, method: 'pkg-config') if not dep.found() build = false diff --git a/drivers/common/octeontx/meson.build b/drivers/common/octeontx/meson.build index 203d1ef49..02b57b95c 100644 --- a/drivers/common/octeontx/meson.build +++ b/drivers/common/octeontx/meson.build @@ -2,4 +2,10 @@ # Copyright(c) 2018 Cavium, Inc # +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + sources = files('octeontx_mbox.c') diff --git a/drivers/common/octeontx2/meson.build b/drivers/common/octeontx2/meson.build index 84fb11524..97293d1a7 100644 --- a/drivers/common/octeontx2/meson.build +++ b/drivers/common/octeontx2/meson.build @@ -2,6 +2,12 @@ # Copyright(C) 2019 Marvell International Ltd. # +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + if not dpdk_conf.get('RTE_ARCH_64') build = false reason = 'only supported on 64-bit' diff --git a/drivers/common/qat/meson.build b/drivers/common/qat/meson.build index 67f7aca97..3ad7dd501 100644 --- a/drivers/common/qat/meson.build +++ b/drivers/common/qat/meson.build @@ -1,6 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Intel Corporation +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + qat_crypto = true qat_crypto_path = 'crypto/qat' qat_crypto_relpath = '../../' + qat_crypto_path From patchwork Fri Apr 2 01:26:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Kadam, Pallavi" X-Patchwork-Id: 90437 X-Patchwork-Delegate: ferruh.yigit@amd.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 6E09BA0548; Fri, 2 Apr 2021 02:54:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6632141000; Fri, 2 Apr 2021 02:54:47 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id F3C6740150 for ; Fri, 2 Apr 2021 02:54:45 +0200 (CEST) IronPort-SDR: 4Cn3VDPyV6mIofq4IWLP987mRpdW/ODCjDXhpwT3nl6AL/9euCxfz7qtJb9z6qXxnTyfv2ExnK ojC+fIAkpT+g== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="189106949" X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="189106949" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 17:54:43 -0700 IronPort-SDR: W02/VI4p05I/fl/tERsNTqaztP9sON9cW4viJEBGYTEZIZQ1B6oaWJ328scFoPj+0ZcuVRYs0N 3ekU2e7doj0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="412947672" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2021 17:54:40 -0700 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com, pallavi.kadam@intel.com Date: Thu, 1 Apr 2021 18:26:20 -0700 Message-Id: <20210402012621.7944-3-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20210402012621.7944-1-pallavi.kadam@intel.com> References: <20210311015848.4976-1-pallavi.kadam@intel.com> <20210402012621.7944-1-pallavi.kadam@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 2/3] net/ice: 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" - Add Intel ice PMD support on Windows. - Remove #include sys/ioctl header file as it is not needed. - Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting types. - Replace POSIX usleep() API with rte API. - Add a new macro for the access() API as the original function has been deprecated on Windows. - Add extra cflags '-fno-asynchronous-unwind-tables' to avoid MinGW build error: Error: invalid register for .seh_savexmm - Add documentation to support ice PMD on Windows. Update the release notes and features list for the same. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon Acked-by: Jie Zhou --- doc/guides/nics/features/ice.ini | 1 + doc/guides/nics/ice.rst | 18 ++++++++++++++++-- doc/guides/rel_notes/release_21_05.rst | 4 ++++ drivers/net/ice/base/ice_flow.c | 2 +- drivers/net/ice/base/ice_flow.h | 2 +- drivers/net/ice/base/ice_osdep.h | 15 +++++++++++++++ drivers/net/ice/base/ice_switch.c | 2 +- drivers/net/ice/base/ice_vlan_mode.h | 1 + drivers/net/ice/base/meson.build | 5 +++++ drivers/net/ice/ice_dcf_ethdev.c | 1 - drivers/net/ice/ice_dcf_parent.c | 10 +++++----- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/ice/ice_rxtx_vec_avx2.c | 2 +- drivers/net/ice/ice_rxtx_vec_avx512.c | 2 +- drivers/net/ice/meson.build | 10 ++++------ 15 files changed, 59 insertions(+), 22 deletions(-) diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini index e30a7d2e5..2b93872b1 100644 --- a/doc/guides/nics/features/ice.ini +++ b/doc/guides/nics/features/ice.ini @@ -40,5 +40,6 @@ Module EEPROM dump = Y Multiprocess aware = Y FreeBSD = Y Linux = Y +Windows = Y x86-32 = Y x86-64 = Y diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index ccda26f82..100086132 100644 --- a/doc/guides/nics/ice.rst +++ b/doc/guides/nics/ice.rst @@ -8,8 +8,8 @@ The ice PMD (**librte_net_ice**) provides poll mode driver support for 10/25/50/100 Gbps Intel® Ethernet 800 Series Network Adapters based on the Intel Ethernet Controller E810 and Intel Ethernet Connection E822/E823. -Prerequisites -------------- +Linux Prerequisites +------------------- - Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. @@ -25,6 +25,20 @@ Prerequisites - To understand DDP for COMMs usage with DPDK, please review `Intel® Ethernet 800 Series Telecommunication (Comms) Dynamic Device Personalization (DDP) Package `_. +Windows Prerequisites +--------------------- + +- Follow the DPDK `Getting Started Guide for Windows `_ to setup the basic DPDK environment. + +- Identify the Intel® Ethernet adapter and get the latest NVM/FW version. + +- To access any Intel® Ethernet hardware, load the NetUIO driver in place of existing built-in (inbox) driver. + +- To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository + `_. + +- Loading of private Dynamic Device Personalization (DDP) package is not supported on Windows. + Recommended Matching List ------------------------- diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst index 19cec62c7..935ac088b 100644 --- a/doc/guides/rel_notes/release_21_05.rst +++ b/doc/guides/rel_notes/release_21_05.rst @@ -97,6 +97,10 @@ New Features * Added flow filter to support GTPU inner L3/L4 fields matching. +* **Updated Intel ice driver.** + + * Added Intel ice support on Windows. + * **Updated NXP DPAA driver.** * Added support for shared ethernet interface. diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index bceb257d6..c12ddfa24 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -3144,7 +3144,7 @@ enum ice_status ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk, if (entry_h == ICE_FLOW_ENTRY_HANDLE_INVAL) return ICE_ERR_PARAM; - entry = ICE_FLOW_ENTRY_PTR((unsigned long)entry_h); + entry = ICE_FLOW_ENTRY_PTR((intptr_t)entry_h); /* Retain the pointer to the flow profile as the entry will be freed */ prof = entry->prof; diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h index c3bce1319..af15ecb0f 100644 --- a/drivers/net/ice/base/ice_flow.h +++ b/drivers/net/ice/base/ice_flow.h @@ -446,7 +446,7 @@ struct ice_flow_entry { u8 acts_cnt; }; -#define ICE_FLOW_ENTRY_HNDL(e) ((unsigned long)e) +#define ICE_FLOW_ENTRY_HNDL(e) ((intptr_t)e) #define ICE_FLOW_ENTRY_PTR(h) ((struct ice_flow_entry *)(h)) struct ice_flow_prof { diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h index 46ac86834..f4cc762e9 100644 --- a/drivers/net/ice/base/ice_osdep.h +++ b/drivers/net/ice/base/ice_osdep.h @@ -62,9 +62,24 @@ typedef uint64_t s64; #define __be64 uint64_t #endif +/* Avoid macro redefinition warning on Windows */ +#ifdef RTE_EXEC_ENV_WINDOWS +#ifdef min +#undef min +#endif +#ifdef max +#undef max +#endif +#endif #define min(a, b) RTE_MIN(a, b) #define max(a, b) RTE_MAX(a, b) +#ifdef RTE_EXEC_ENV_WINDOWS +#define ice_access _access +#else +#define ice_access access +#endif + #define FIELD_SIZEOF(t, f) RTE_SIZEOF_FIELD(t, f) #define ARRAY_SIZE(arr) RTE_DIM(arr) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 3dc764266..9233c5fd2 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6683,7 +6683,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule, for (j = 0; j < sizeof(rule->m_u) / sizeof(u16); j++) if (((u16 *)&rule->m_u)[j] && - rule->type < ARRAY_SIZE(ice_prot_ext)) { + (size_t)rule->type < ARRAY_SIZE(ice_prot_ext)) { /* No more space to accommodate */ if (word >= ICE_MAX_CHAIN_WORDS) return 0; diff --git a/drivers/net/ice/base/ice_vlan_mode.h b/drivers/net/ice/base/ice_vlan_mode.h index e9f13e781..bcb6ff713 100644 --- a/drivers/net/ice/base/ice_vlan_mode.h +++ b/drivers/net/ice/base/ice_vlan_mode.h @@ -6,6 +6,7 @@ #define _ICE_VLAN_MODE_H_ #include "ice_osdep.h" +#include "ice_status.h" struct ice_hw; diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build index b82d05fe7..c44d0e035 100644 --- a/drivers/net/ice/base/meson.build +++ b/drivers/net/ice/base/meson.build @@ -21,6 +21,11 @@ error_cflags = ['-Wno-unused-value', '-Wno-unused-variable', '-Wno-unused-parameter', ] + +if is_windows and cc.get_id() != 'clang' + cflags += ['-fno-asynchronous-unwind-tables'] +endif + c_args = cflags foreach flag: error_cflags diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index 215d71e1b..b937cbbb0 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index 476fd4906..a8571b35e 100644 --- a/drivers/net/ice/ice_dcf_parent.c +++ b/drivers/net/ice/ice_dcf_parent.c @@ -121,7 +121,7 @@ ice_dcf_vsi_update_service_handler(void *param) struct ice_dcf_hw *hw = reset_param->dcf_hw; struct ice_dcf_adapter *adapter; - usleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL); + rte_delay_us(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL); rte_spinlock_lock(&vsi_update_lock); @@ -315,24 +315,24 @@ ice_dcf_request_pkg_name(struct ice_hw *hw, char *pkg_name) snprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE, ICE_PKG_FILE_SEARCH_PATH_UPDATES "ice-%016llx.pkg", (unsigned long long)dsn); - if (!access(pkg_name, 0)) + if (!ice_access(pkg_name, 0)) return 0; snprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE, ICE_PKG_FILE_SEARCH_PATH_DEFAULT "ice-%016llx.pkg", (unsigned long long)dsn); - if (!access(pkg_name, 0)) + if (!ice_access(pkg_name, 0)) return 0; pkg_file_direct: snprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE, "%s", ICE_PKG_FILE_UPDATES); - if (!access(pkg_name, 0)) + if (!ice_access(pkg_name, 0)) return 0; snprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE, "%s", ICE_PKG_FILE_DEFAULT); - if (!access(pkg_name, 0)) + if (!ice_access(pkg_name, 0)) return 0; return -1; diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index f0dc54357..81558fd8d 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1678,17 +1678,17 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_UPDATES, ICE_MAX_PKG_FILENAME_SIZE); - if (!access(strcat(pkg_file, opt_ddp_filename), 0)) + if (!ice_access(strcat(pkg_file, opt_ddp_filename), 0)) return 0; strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE); - if (!access(strcat(pkg_file, opt_ddp_filename), 0)) + if (!ice_access(strcat(pkg_file, opt_ddp_filename), 0)) return 0; fail_dsn: strncpy(pkg_file, ICE_PKG_FILE_UPDATES, ICE_MAX_PKG_FILENAME_SIZE); - if (!access(pkg_file, 0)) + if (!ice_access(pkg_file, 0)) return 0; strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE); return 0; diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c index 1cc54903c..25efd30e6 100644 --- a/drivers/net/ice/ice_rxtx_vec_avx2.c +++ b/drivers/net/ice/ice_rxtx_vec_avx2.c @@ -4,7 +4,7 @@ #include "ice_rxtx_vec_common.h" -#include +#include #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wcast-qual" diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c index 0e5a676e6..835d0aa70 100644 --- a/drivers/net/ice/ice_rxtx_vec_avx512.c +++ b/drivers/net/ice/ice_rxtx_vec_avx512.c @@ -4,7 +4,7 @@ #include "ice_rxtx_vec_common.h" -#include +#include #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wcast-qual" diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index 9a67c8f7b..44ef64b4c 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -1,12 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -if is_windows - build = false - reason = 'not supported on Windows' - subdir_done() -endif - subdir('base') objs = [base_objs] @@ -26,6 +20,10 @@ includes += include_directories('base', '../../common/iavf') if arch_subdir == 'x86' sources += files('ice_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 From patchwork Fri Apr 2 01:26:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kadam, Pallavi" X-Patchwork-Id: 90436 X-Patchwork-Delegate: ferruh.yigit@amd.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 4165EA0548; Fri, 2 Apr 2021 02:54:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE8E940F35; Fri, 2 Apr 2021 02:54:46 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id EFFCA40150 for ; Fri, 2 Apr 2021 02:54:44 +0200 (CEST) IronPort-SDR: dNnS7z5DvZPN0VZcFdtxc1H/Rhmvn0FKuVX/wgbRBwWtzS4AmM6ApfipjNOjV0ADK8XHvSgMmZ PPzgMCFkCAng== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="189106950" X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="189106950" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 17:54:43 -0700 IronPort-SDR: kw4B8HEqHmdbASFzUwnsoo2dPkNMRb11HDJjS2Mfm9oh5A6y7tO+RsbVqjTGZ6Burp/79bjQJQ mPkfVN6tY5Qg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="412947676" Received: from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain) ([10.166.188.111]) by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2021 17:54:41 -0700 From: Pallavi Kadam To: dev@dpdk.org, thomas@monjalon.net Cc: dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com, pallavi.kadam@intel.com Date: Thu, 1 Apr 2021 18:26:21 -0700 Message-Id: <20210402012621.7944-4-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20210402012621.7944-1-pallavi.kadam@intel.com> References: <20210311015848.4976-1-pallavi.kadam@intel.com> <20210402012621.7944-1-pallavi.kadam@intel.com> Subject: [dpdk-dev] [PATCH v3 3/3] net/ice: disable ice DDP package 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" Disable loading of external DDP package as it is not supported on Windows. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon Acked-by: Jie Zhou --- doc/guides/nics/ice.rst | 5 +++++ drivers/net/ice/ice_ethdev.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index 100086132..8d40d1741 100644 --- a/doc/guides/nics/ice.rst +++ b/doc/guides/nics/ice.rst @@ -330,3 +330,8 @@ is stored in ``ice_adapter->active_pkg_type``. A symbolic link to the DDP package file is also ok. The same package file is used by both the kernel driver and the DPDK PMD. + + .. Note:: + + Windows support: The DDP package is not supported on Windows so, + loading of the package is disabled on Windows. diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 81558fd8d..1dea6421c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1650,6 +1650,7 @@ ice_pf_setup(struct ice_pf *pf) * Extract device serial number from PCIe Configuration Space and * determine the pkg file path according to the DSN. */ +#ifndef RTE_EXEC_ENV_WINDOWS static int ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) { @@ -1693,6 +1694,7 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE); return 0; } +#endif enum ice_pkg_type ice_load_pkg_type(struct ice_hw *hw) @@ -1718,6 +1720,7 @@ ice_load_pkg_type(struct ice_hw *hw) return package_type; } +#ifndef RTE_EXEC_ENV_WINDOWS static int ice_load_pkg(struct rte_eth_dev *dev) { struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); @@ -1793,6 +1796,7 @@ static int ice_load_pkg(struct rte_eth_dev *dev) rte_free(buf); return err; } +#endif static void ice_base_queue_get(struct ice_pf *pf) @@ -2073,6 +2077,7 @@ ice_dev_init(struct rte_eth_dev *dev) return -EINVAL; } +#ifndef RTE_EXEC_ENV_WINDOWS ret = ice_load_pkg(dev); if (ret) { if (ad->devargs.safe_mode_support == 0) { @@ -2085,6 +2090,7 @@ ice_dev_init(struct rte_eth_dev *dev) "Entering Safe Mode"); ad->is_safe_mode = 1; } +#endif PMD_INIT_LOG(INFO, "FW %d.%d.%05d API %d.%d", hw->fw_maj_ver, hw->fw_min_ver, hw->fw_build,