get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/90437/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 90437,
    "url": "http://patches.dpdk.org/api/patches/90437/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210402012621.7944-3-pallavi.kadam@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210402012621.7944-3-pallavi.kadam@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210402012621.7944-3-pallavi.kadam@intel.com",
    "date": "2021-04-02T01:26:20",
    "name": "[v3,2/3] net/ice: build on Windows",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "755194cdebfc60816849602bc2f98196bfd979e8",
    "submitter": {
        "id": 1177,
        "url": "http://patches.dpdk.org/api/people/1177/?format=api",
        "name": "Kadam, Pallavi",
        "email": "pallavi.kadam@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210402012621.7944-3-pallavi.kadam@intel.com/mbox/",
    "series": [
        {
            "id": 16067,
            "url": "http://patches.dpdk.org/api/series/16067/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16067",
            "date": "2021-04-02T01:26:21",
            "name": "Support ice PMD on Windows",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/16067/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/90437/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/90437/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6E09BA0548;\n\tFri,  2 Apr 2021 02:54:53 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B6632141000;\n\tFri,  2 Apr 2021 02:54:47 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id F3C6740150\n for <dev@dpdk.org>; Fri,  2 Apr 2021 02:54:45 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Apr 2021 17:54:43 -0700",
            "from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain)\n ([10.166.188.111])\n by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2021 17:54:40 -0700"
        ],
        "IronPort-SDR": [
            "\n 4Cn3VDPyV6mIofq4IWLP987mRpdW/ODCjDXhpwT3nl6AL/9euCxfz7qtJb9z6qXxnTyfv2ExnK\n ojC+fIAkpT+g==",
            "\n W02/VI4p05I/fl/tERsNTqaztP9sON9cW4viJEBGYTEZIZQ1B6oaWJ328scFoPj+0ZcuVRYs0N\n 3ekU2e7doj0w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9941\"; a=\"189106949\"",
            "E=Sophos;i=\"5.81,298,1610438400\"; d=\"scan'208\";a=\"189106949\"",
            "E=Sophos;i=\"5.81,298,1610438400\"; d=\"scan'208\";a=\"412947672\""
        ],
        "X-ExtLoop1": "1",
        "From": "Pallavi Kadam <pallavi.kadam@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net",
        "Cc": "dmitry.kozliuk@gmail.com, ranjit.menon@intel.com, qiming.yang@intel.com,\n 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>\n <20210402012621.7944-1-pallavi.kadam@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=y",
        "Content-Transfer-Encoding": "8bit",
        "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 <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "- Add Intel ice PMD support on Windows.\n- Remove #include sys/ioctl header file as it is not needed.\n- Replace x86intrin.h with rte_vect.h to avoid __m_prefetchw conflicting\n  types.\n- Replace POSIX usleep() API with rte API.\n- Add a new macro for the access() API as the original function\n  has been deprecated on Windows.\n- Add extra cflags '-fno-asynchronous-unwind-tables'\n  to avoid MinGW build error:\n  Error: invalid register for .seh_savexmm\n- Add documentation to support ice PMD on Windows.\n  Update the release notes and features list for the same.\n\nSigned-off-by: Pallavi Kadam <pallavi.kadam@intel.com>\nReviewed-by: Ranjit Menon <ranjit.menon@intel.com>\nAcked-by: Jie Zhou <jizh@microsoft.com>\n---\n doc/guides/nics/features/ice.ini       |  1 +\n doc/guides/nics/ice.rst                | 18 ++++++++++++++++--\n doc/guides/rel_notes/release_21_05.rst |  4 ++++\n drivers/net/ice/base/ice_flow.c        |  2 +-\n drivers/net/ice/base/ice_flow.h        |  2 +-\n drivers/net/ice/base/ice_osdep.h       | 15 +++++++++++++++\n drivers/net/ice/base/ice_switch.c      |  2 +-\n drivers/net/ice/base/ice_vlan_mode.h   |  1 +\n drivers/net/ice/base/meson.build       |  5 +++++\n drivers/net/ice/ice_dcf_ethdev.c       |  1 -\n drivers/net/ice/ice_dcf_parent.c       | 10 +++++-----\n drivers/net/ice/ice_ethdev.c           |  6 +++---\n drivers/net/ice/ice_rxtx_vec_avx2.c    |  2 +-\n drivers/net/ice/ice_rxtx_vec_avx512.c  |  2 +-\n drivers/net/ice/meson.build            | 10 ++++------\n 15 files changed, 59 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini\nindex e30a7d2e5..2b93872b1 100644\n--- a/doc/guides/nics/features/ice.ini\n+++ b/doc/guides/nics/features/ice.ini\n@@ -40,5 +40,6 @@ Module EEPROM dump   = Y\n Multiprocess aware   = Y\n FreeBSD              = Y\n Linux                = Y\n+Windows              = Y\n x86-32               = Y\n x86-64               = Y\ndiff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst\nindex ccda26f82..100086132 100644\n--- a/doc/guides/nics/ice.rst\n+++ b/doc/guides/nics/ice.rst\n@@ -8,8 +8,8 @@ The ice PMD (**librte_net_ice**) provides poll mode driver support for\n 10/25/50/100 Gbps Intel® Ethernet 800 Series Network Adapters based on\n the Intel Ethernet Controller E810 and Intel Ethernet Connection E822/E823.\n \n-Prerequisites\n--------------\n+Linux Prerequisites\n+-------------------\n \n - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.\n \n@@ -25,6 +25,20 @@ Prerequisites\n - To understand DDP for COMMs usage with DPDK, please review `Intel® Ethernet 800 Series Telecommunication (Comms)\n   Dynamic Device Personalization (DDP) Package <https://cdrdv2.intel.com/v1/dl/getContent/618651>`_.\n \n+Windows Prerequisites\n+---------------------\n+\n+- Follow the DPDK `Getting Started Guide for Windows <https://doc.dpdk.org/guides/windows_gsg/index.html>`_ to setup the basic DPDK environment.\n+\n+- Identify the Intel® Ethernet adapter and get the latest NVM/FW version.\n+\n+- To access any Intel® Ethernet hardware, load the NetUIO driver in place of existing built-in (inbox) driver.\n+\n+- To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository\n+  <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.\n+\n+- Loading of private Dynamic Device Personalization (DDP) package is not supported on Windows.\n+\n \n Recommended Matching List\n -------------------------\ndiff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 19cec62c7..935ac088b 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -97,6 +97,10 @@ New Features\n \n   * Added flow filter to support GTPU inner L3/L4 fields matching.\n \n+* **Updated Intel ice driver.**\n+\n+  * Added Intel ice support on Windows.\n+\n * **Updated NXP DPAA driver.**\n \n   * Added support for shared ethernet interface.\ndiff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c\nindex bceb257d6..c12ddfa24 100644\n--- a/drivers/net/ice/base/ice_flow.c\n+++ b/drivers/net/ice/base/ice_flow.c\n@@ -3144,7 +3144,7 @@ enum ice_status ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk,\n \tif (entry_h == ICE_FLOW_ENTRY_HANDLE_INVAL)\n \t\treturn ICE_ERR_PARAM;\n \n-\tentry = ICE_FLOW_ENTRY_PTR((unsigned long)entry_h);\n+\tentry = ICE_FLOW_ENTRY_PTR((intptr_t)entry_h);\n \n \t/* Retain the pointer to the flow profile as the entry will be freed */\n \tprof = entry->prof;\ndiff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h\nindex c3bce1319..af15ecb0f 100644\n--- a/drivers/net/ice/base/ice_flow.h\n+++ b/drivers/net/ice/base/ice_flow.h\n@@ -446,7 +446,7 @@ struct ice_flow_entry {\n \tu8 acts_cnt;\n };\n \n-#define ICE_FLOW_ENTRY_HNDL(e)\t((unsigned long)e)\n+#define ICE_FLOW_ENTRY_HNDL(e)\t((intptr_t)e)\n #define ICE_FLOW_ENTRY_PTR(h)\t((struct ice_flow_entry *)(h))\n \n struct ice_flow_prof {\ndiff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h\nindex 46ac86834..f4cc762e9 100644\n--- a/drivers/net/ice/base/ice_osdep.h\n+++ b/drivers/net/ice/base/ice_osdep.h\n@@ -62,9 +62,24 @@ typedef uint64_t        s64;\n #define __be64          uint64_t\n #endif\n \n+/* Avoid macro redefinition warning on Windows */\n+#ifdef RTE_EXEC_ENV_WINDOWS\n+#ifdef min\n+#undef min\n+#endif\n+#ifdef max\n+#undef max\n+#endif\n+#endif\n #define min(a, b) RTE_MIN(a, b)\n #define max(a, b) RTE_MAX(a, b)\n \n+#ifdef RTE_EXEC_ENV_WINDOWS\n+#define ice_access _access\n+#else\n+#define ice_access access\n+#endif\n+\n #define FIELD_SIZEOF(t, f) RTE_SIZEOF_FIELD(t, f)\n #define ARRAY_SIZE(arr) RTE_DIM(arr)\n \ndiff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 3dc764266..9233c5fd2 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -6683,7 +6683,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule,\n \n \tfor (j = 0; j < sizeof(rule->m_u) / sizeof(u16); j++)\n \t\tif (((u16 *)&rule->m_u)[j] &&\n-\t\t    rule->type < ARRAY_SIZE(ice_prot_ext)) {\n+\t\t    (size_t)rule->type < ARRAY_SIZE(ice_prot_ext)) {\n \t\t\t/* No more space to accommodate */\n \t\t\tif (word >= ICE_MAX_CHAIN_WORDS)\n \t\t\t\treturn 0;\ndiff --git a/drivers/net/ice/base/ice_vlan_mode.h b/drivers/net/ice/base/ice_vlan_mode.h\nindex e9f13e781..bcb6ff713 100644\n--- a/drivers/net/ice/base/ice_vlan_mode.h\n+++ b/drivers/net/ice/base/ice_vlan_mode.h\n@@ -6,6 +6,7 @@\n #define _ICE_VLAN_MODE_H_\n \n #include \"ice_osdep.h\"\n+#include \"ice_status.h\"\n \n struct ice_hw;\n \ndiff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build\nindex b82d05fe7..c44d0e035 100644\n--- a/drivers/net/ice/base/meson.build\n+++ b/drivers/net/ice/base/meson.build\n@@ -21,6 +21,11 @@ error_cflags = ['-Wno-unused-value',\n \t\t'-Wno-unused-variable',\n \t\t'-Wno-unused-parameter',\n ]\n+\n+if is_windows and cc.get_id() != 'clang'\n+\tcflags += ['-fno-asynchronous-unwind-tables']\n+endif\n+\n c_args = cflags\n \n foreach flag: error_cflags\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 215d71e1b..b937cbbb0 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -5,7 +5,6 @@\n #include <errno.h>\n #include <stdbool.h>\n #include <sys/types.h>\n-#include <sys/ioctl.h>\n #include <unistd.h>\n \n #include <rte_interrupts.h>\ndiff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c\nindex 476fd4906..a8571b35e 100644\n--- a/drivers/net/ice/ice_dcf_parent.c\n+++ b/drivers/net/ice/ice_dcf_parent.c\n@@ -121,7 +121,7 @@ ice_dcf_vsi_update_service_handler(void *param)\n \tstruct ice_dcf_hw *hw = reset_param->dcf_hw;\n \tstruct ice_dcf_adapter *adapter;\n \n-\tusleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);\n+\trte_delay_us(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);\n \n \trte_spinlock_lock(&vsi_update_lock);\n \n@@ -315,24 +315,24 @@ ice_dcf_request_pkg_name(struct ice_hw *hw, char *pkg_name)\n \tsnprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE,\n \t\t ICE_PKG_FILE_SEARCH_PATH_UPDATES \"ice-%016llx.pkg\",\n \t\t (unsigned long long)dsn);\n-\tif (!access(pkg_name, 0))\n+\tif (!ice_access(pkg_name, 0))\n \t\treturn 0;\n \n \tsnprintf(pkg_name, ICE_MAX_PKG_FILENAME_SIZE,\n \t\t ICE_PKG_FILE_SEARCH_PATH_DEFAULT \"ice-%016llx.pkg\",\n \t\t (unsigned long long)dsn);\n-\tif (!access(pkg_name, 0))\n+\tif (!ice_access(pkg_name, 0))\n \t\treturn 0;\n \n pkg_file_direct:\n \tsnprintf(pkg_name,\n \t\t ICE_MAX_PKG_FILENAME_SIZE, \"%s\", ICE_PKG_FILE_UPDATES);\n-\tif (!access(pkg_name, 0))\n+\tif (!ice_access(pkg_name, 0))\n \t\treturn 0;\n \n \tsnprintf(pkg_name,\n \t\t ICE_MAX_PKG_FILENAME_SIZE, \"%s\", ICE_PKG_FILE_DEFAULT);\n-\tif (!access(pkg_name, 0))\n+\tif (!ice_access(pkg_name, 0))\n \t\treturn 0;\n \n \treturn -1;\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex f0dc54357..81558fd8d 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -1678,17 +1678,17 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)\n \n \tstrncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_UPDATES,\n \t\tICE_MAX_PKG_FILENAME_SIZE);\n-\tif (!access(strcat(pkg_file, opt_ddp_filename), 0))\n+\tif (!ice_access(strcat(pkg_file, opt_ddp_filename), 0))\n \t\treturn 0;\n \n \tstrncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_DEFAULT,\n \t\tICE_MAX_PKG_FILENAME_SIZE);\n-\tif (!access(strcat(pkg_file, opt_ddp_filename), 0))\n+\tif (!ice_access(strcat(pkg_file, opt_ddp_filename), 0))\n \t\treturn 0;\n \n fail_dsn:\n \tstrncpy(pkg_file, ICE_PKG_FILE_UPDATES, ICE_MAX_PKG_FILENAME_SIZE);\n-\tif (!access(pkg_file, 0))\n+\tif (!ice_access(pkg_file, 0))\n \t\treturn 0;\n \tstrncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE);\n \treturn 0;\ndiff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c\nindex 1cc54903c..25efd30e6 100644\n--- a/drivers/net/ice/ice_rxtx_vec_avx2.c\n+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c\n@@ -4,7 +4,7 @@\n \n #include \"ice_rxtx_vec_common.h\"\n \n-#include <x86intrin.h>\n+#include <rte_vect.h>\n \n #ifndef __INTEL_COMPILER\n #pragma GCC diagnostic ignored \"-Wcast-qual\"\ndiff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c\nindex 0e5a676e6..835d0aa70 100644\n--- a/drivers/net/ice/ice_rxtx_vec_avx512.c\n+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c\n@@ -4,7 +4,7 @@\n \n #include \"ice_rxtx_vec_common.h\"\n \n-#include <x86intrin.h>\n+#include <rte_vect.h>\n \n #ifndef __INTEL_COMPILER\n #pragma GCC diagnostic ignored \"-Wcast-qual\"\ndiff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build\nindex 9a67c8f7b..44ef64b4c 100644\n--- a/drivers/net/ice/meson.build\n+++ b/drivers/net/ice/meson.build\n@@ -1,12 +1,6 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2018 Intel Corporation\n \n-if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n-endif\n-\n subdir('base')\n objs = [base_objs]\n \n@@ -26,6 +20,10 @@ includes += include_directories('base', '../../common/iavf')\n if arch_subdir == 'x86'\n \tsources += files('ice_rxtx_vec_sse.c')\n \n+\tif is_windows and cc.get_id() != 'clang'\n+\t\tcflags += ['-fno-asynchronous-unwind-tables']\n+\tendif\n+\n \t# compile AVX2 version if either:\n \t# a. we have AVX supported in minimum instruction set baseline\n \t# b. it's not minimum instruction set, but supported by compiler\n",
    "prefixes": [
        "v3",
        "2/3"
    ]
}