get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126517,
    "url": "http://patches.dpdk.org/api/patches/126517/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1682453329-20435-2-git-send-email-roretzla@linux.microsoft.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": "<1682453329-20435-2-git-send-email-roretzla@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1682453329-20435-2-git-send-email-roretzla@linux.microsoft.com",
    "date": "2023-04-25T20:08:46",
    "name": "[v3,1/4] build: unblock the use of the MSVC compiler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2c8f921f53b4680c82728d15266a0359d1ad87f9",
    "submitter": {
        "id": 2077,
        "url": "http://patches.dpdk.org/api/people/2077/?format=api",
        "name": "Tyler Retzlaff",
        "email": "roretzla@linux.microsoft.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1682453329-20435-2-git-send-email-roretzla@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 27862,
            "url": "http://patches.dpdk.org/api/series/27862/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27862",
            "date": "2023-04-25T20:08:47",
            "name": "enable use of the MSVC compiler",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/27862/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126517/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/126517/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 A9155429D8;\n\tTue, 25 Apr 2023 22:08:56 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BB44342B8E;\n\tTue, 25 Apr 2023 22:08:52 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id CED6A40ED6\n for <dev@dpdk.org>; Tue, 25 Apr 2023 22:08:50 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1086)\n id 3504F21C2B2C; Tue, 25 Apr 2023 13:08:50 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 3504F21C2B2C",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1682453330;\n bh=biM2Y9lxIyG6GjOvd5N4UAUr2SQaeCpJdltVQ3Z9w3M=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=WZ6hxh3a0K+I0vlf/wSbidDf1jx3wRcn6cWpwCkJUMlGPCyX89yOqIs8kXBhGZpAq\n mgK4/gAI74UmTga0Jq1w40kO3Nfb+FlhAL48memCymxuGzMegyKcrdh39fzlf3NsGO\n xDbBnR8dz1aTCPO8bcacF81k0KfXQW11r08C+e1k=",
        "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, david.marchand@redhat.com,\n thomas@monjalon.net,\n Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "Subject": "[PATCH v3 1/4] build: unblock the use of the MSVC compiler",
        "Date": "Tue, 25 Apr 2023 13:08:46 -0700",
        "Message-Id": "<1682453329-20435-2-git-send-email-roretzla@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1682453329-20435-1-git-send-email-roretzla@linux.microsoft.com>",
        "References": "<1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com>\n <1682453329-20435-1-git-send-email-roretzla@linux.microsoft.com>",
        "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"
    },
    "content": "Detect when MSVC toolset is available and tweak toolchain arguments\nwhere the meson build system offers no abstraction.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n buildtools/meson.build | 10 +++++++---\n config/meson.build     | 21 ++++++++++++++-------\n config/x86/meson.build |  8 +++++---\n lib/meson.build        | 13 ++++++++++---\n 4 files changed, 36 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/buildtools/meson.build b/buildtools/meson.build\nindex e1c600e..838c39f 100644\n--- a/buildtools/meson.build\n+++ b/buildtools/meson.build\n@@ -4,7 +4,9 @@\n pkgconf = find_program('pkg-config', 'pkgconf', required: false)\n check_symbols = find_program('check-symbols.sh')\n ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')\n-objdump = find_program('objdump', 'llvm-objdump')\n+if cc.get_id() != 'msvc'\n+    objdump = find_program('objdump', 'llvm-objdump')\n+endif\n \n python3 = import('python').find_installation(required: false)\n if python3.found()\n@@ -18,8 +20,10 @@ map_to_win_cmd = py3 + files('map_to_win.py')\n sphinx_wrapper = py3 + files('call-sphinx-build.py')\n get_cpu_count_cmd = py3 + files('get-cpu-count.py')\n get_numa_count_cmd = py3 + files('get-numa-count.py')\n-binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +\n-                        [objdump] + cc.cmd_array())\n+if cc.get_id() != 'msvc'\n+    binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +\n+                            [objdump] + cc.cmd_array())\n+endif\n \n # select library and object file format\n pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]\ndiff --git a/config/meson.build b/config/meson.build\nindex fa730a1..9a3f499 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -16,7 +16,8 @@ endforeach\n \n # MS linker requires special treatment.\n # TODO: use cc.get_linker_id() with Meson >= 0.54\n-is_ms_linker = is_windows and (cc.get_id() == 'clang')\n+is_ms_compiler = is_windows and (cc.get_id() == 'msvc')\n+is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler)\n \n # set the major version, which might be used by drivers and libraries\n # depending on the configuration options\n@@ -130,11 +131,13 @@ dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)\n machine_args = []\n \n # ppc64 does not support -march= at all, use -mcpu and -mtune for that\n-if host_machine.cpu_family().startswith('ppc')\n-    machine_args += '-mcpu=' + cpu_instruction_set\n-    machine_args += '-mtune=' + cpu_instruction_set\n-else\n-    machine_args += '-march=' + cpu_instruction_set\n+if not is_ms_compiler\n+    if host_machine.cpu_family().startswith('ppc')\n+        machine_args += '-mcpu=' + cpu_instruction_set\n+        machine_args += '-mtune=' + cpu_instruction_set\n+    else\n+        machine_args += '-march=' + cpu_instruction_set\n+    endif\n endif\n \n toolchain = cc.get_id()\n@@ -253,7 +256,11 @@ if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false\n endif\n \n # add -include rte_config to cflags\n-add_project_arguments('-include', 'rte_config.h', language: 'c')\n+if is_ms_compiler\n+    add_project_arguments('/FI', 'rte_config.h', language: 'c')\n+else\n+    add_project_arguments('-include', 'rte_config.h', language: 'c')\n+endif\n \n # enable extra warnings and disable any unwanted warnings\n # -Wall is added by default at warning level 1, and -Wextra\ndiff --git a/config/x86/meson.build b/config/x86/meson.build\nindex 54345c4..11f0bcc 100644\n--- a/config/x86/meson.build\n+++ b/config/x86/meson.build\n@@ -25,9 +25,11 @@ if cc.has_argument('-mavx512f')\n endif\n \n # we require SSE4.2 for DPDK\n-if cc.get_define('__SSE4_2__', args: machine_args) == ''\n-    message('SSE 4.2 not enabled by default, explicitly enabling')\n-    machine_args += '-msse4'\n+if not is_ms_compiler\n+    if cc.get_define('__SSE4_2__', args: machine_args) == ''\n+        message('SSE 4.2 not enabled by default, explicitly enabling')\n+        machine_args += '-msse4'\n+    endif\n endif\n \n base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']\ndiff --git a/lib/meson.build b/lib/meson.build\nindex dc8aa4a..40c632a 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -241,9 +241,16 @@ foreach l:libraries\n                 output: '@0@_exports.def'.format(libname))\n         lk_deps += [def_file]\n \n-        lk_args = ['-Wl,/def:' + def_file.full_path()]\n-        if meson.version().version_compare('<0.54.0')\n-            lk_args += ['-Wl,/implib:lib\\\\librte_' + l + '.dll.a']\n+        if is_ms_compiler\n+            lk_args = ['/def:' + def_file.full_path()]\n+            if meson.version().version_compare('<0.54.0')\n+                lk_args += ['/implib:lib\\\\librte_' + l + '.dll.a']\n+            endif\n+        else\n+            lk_args = ['-Wl,/def:' + def_file.full_path()]\n+            if meson.version().version_compare('<0.54.0')\n+                lk_args += ['-Wl,/implib:lib\\\\librte_' + l + '.dll.a']\n+            endif\n         endif\n     else\n         if is_windows\n",
    "prefixes": [
        "v3",
        "1/4"
    ]
}