get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 92042,
    "url": "http://patches.dpdk.org/api/patches/92042/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1619137920-13449-6-git-send-email-jizh@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": "<1619137920-13449-6-git-send-email-jizh@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1619137920-13449-6-git-send-email-jizh@linux.microsoft.com",
    "date": "2021-04-23T00:31:55",
    "name": "[v7,05/10] app/testpmd: add clock_gettime on Windows",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "71cfef09d71cf4c3802b1c8f3bbffc1fb3ac11f6",
    "submitter": {
        "id": 1934,
        "url": "http://patches.dpdk.org/api/people/1934/?format=api",
        "name": "Jie Zhou",
        "email": "jizh@linux.microsoft.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/1619137920-13449-6-git-send-email-jizh@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 16612,
            "url": "http://patches.dpdk.org/api/series/16612/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16612",
            "date": "2021-04-23T00:31:51",
            "name": "app/testpmd: enable testpmd on Windows",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/16612/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/92042/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/92042/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 C1342A0A02;\n\tFri, 23 Apr 2021 02:32:52 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F046F41DDE;\n\tFri, 23 Apr 2021 02:32:22 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 82B9641ACA\n for <dev@dpdk.org>; Fri, 23 Apr 2021 02:32:07 +0200 (CEST)",
            "from\n linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net\n (linux.microsoft.com [13.77.154.182])\n by linux.microsoft.com (Postfix) with ESMTPSA id 6685F20B83DA;\n Thu, 22 Apr 2021 17:32:06 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 6685F20B83DA",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1619137926;\n bh=lKaMLVidxfsfNZIthKZhlVgYTS35iQ9Y0R+kgWLO7SE=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Xa0Bw9r8Prd0k9g0+m27YZFHxuM4R8mkwvGQLbkkhpVZPiqj91OasQ0TH+WxSVkJS\n tTr0cbrtRfZz56w4g694srGPzJcGRoI/m7iuunakO2pxc3F7RXk3k7bYDq8ZFO1xHW\n 4EGU+qMnC9bRYldeiFYE3cAIGApjZPgDjc7L8N6M=",
        "From": "Jie Zhou <jizh@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com, roretzla@microsoft.com,\n pallavi.kadam@intel.com, thomas@monjalon.net, bruce.richardson@intel.com,\n ferruh.yigit@intel.com, konstantin.ananyev@intel.com",
        "Date": "Thu, 22 Apr 2021 17:31:55 -0700",
        "Message-Id": "<1619137920-13449-6-git-send-email-jizh@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1619137920-13449-1-git-send-email-jizh@linux.microsoft.com>",
        "References": "<1618874400-26819-1-git-send-email-jizh@linux.microsoft.com>\n <1619137920-13449-1-git-send-email-jizh@linux.microsoft.com>",
        "Subject": "[dpdk-dev] [PATCH v7 05/10] app/testpmd: add clock_gettime on\n 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 clock_gettime for testpmd on Windows in config.h\n\nSigned-off-by: Jie Zhou <jizh@microsoft.com>\nSigned-off-by: Jie Zhou <jizh@linux.microsoft.com>\n---\n app/test-pmd/config.c | 10 ++-----\n app/test-pmd/config.h | 66 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 68 insertions(+), 8 deletions(-)\n create mode 100644 app/test-pmd/config.h",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex e189062ef..9fbf2f5f7 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -54,17 +54,10 @@\n \n #include \"testpmd.h\"\n #include \"cmdline_mtr.h\"\n+#include \"config.h\"\n \n #define ETHDEV_FWVERS_LEN 32\n \n-#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */\n-#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW\n-#else\n-#define CLOCK_TYPE_ID CLOCK_MONOTONIC\n-#endif\n-\n-#define NS_PER_SEC 1E9\n-\n static char *flowtype_to_str(uint16_t flow_type);\n \n static const struct {\n@@ -205,6 +198,7 @@ nic_stats_display(portid_t port_id)\n \t       \"%-\"PRIu64\"\\n\", stats.opackets, stats.oerrors, stats.obytes);\n \n \tdiff_ns = 0;\n+\n \tif (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {\n \t\tuint64_t ns;\n \ndiff --git a/app/test-pmd/config.h b/app/test-pmd/config.h\nnew file mode 100644\nindex 000000000..e21bed576\n--- /dev/null\n+++ b/app/test-pmd/config.h\n@@ -0,0 +1,66 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Microsoft Corporation\n+ */\n+\n+#ifndef _CONFIG_H_\n+#define _CONFIG_H_\n+\n+#include <rte_os_shim.h>\n+\n+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */\n+#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW\n+#else\n+#define CLOCK_TYPE_ID CLOCK_MONOTONIC\n+#endif\n+\n+#define NS_PER_SEC 1E9\n+\n+#ifdef RTE_EXEC_ENV_WINDOWS\n+\n+/* Identifier for system-wide realtime clock. */\n+#define CLOCK_REALTIME\t\t\t0\n+/* Monotonic system-wide clock. */\n+#define CLOCK_MONOTONIC\t\t\t1\n+/* High-resolution timer from the CPU. */\n+#define CLOCK_PROCESS_CPUTIME_ID\t2\n+/* Thread-specific CPU-time clock. */\n+#define CLOCK_THREAD_CPUTIME_ID\t\t3\n+\n+typedef int clockid_t;\n+\n+#ifndef clock_gettime\n+#define clock_gettime _clock_gettime\n+#endif\n+\n+static int\n+_clock_gettime(clockid_t clock_id, struct timespec* tp)\n+{\n+\tLARGE_INTEGER pf, pc;\n+\tLONGLONG nsec;\n+\n+\tswitch (clock_id) {\n+\tcase CLOCK_REALTIME:\n+\t\tif (timespec_get(tp, TIME_UTC) != TIME_UTC)\n+\t\t\treturn -1;\n+\n+\t\treturn 0;\n+\tcase CLOCK_MONOTONIC:\n+\t\tif (QueryPerformanceFrequency(&pf) == 0)\n+\t\t\treturn -1;\n+\n+\t\tif (QueryPerformanceCounter(&pc) == 0)\n+\t\t\treturn -1;\n+\n+\t\tnsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;\n+\t\ttp->tv_sec = nsec / NS_PER_SEC;\n+\t\ttp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;\n+\n+\t\treturn 0;\n+\tdefault:\n+\t\treturn -1;\n+\t}\n+}\n+\n+#endif /* RTE_EXEC_ENV_WINDOWS */\n+\n+#endif /* _CONFIG_H_ */\n",
    "prefixes": [
        "v7",
        "05/10"
    ]
}