get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71507,
    "url": "http://patches.dpdk.org/api/patches/71507/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200614084348.22404-2-fady@mellanox.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": "<20200614084348.22404-2-fady@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200614084348.22404-2-fady@mellanox.com",
    "date": "2020-06-14T08:43:46",
    "name": "[v8,1/3] timer: move from common to Unix directory",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a8d22dcfdb775d6bb0f2b8d19ae371b6bd248c10",
    "submitter": {
        "id": 1650,
        "url": "http://patches.dpdk.org/api/people/1650/?format=api",
        "name": "Fady Bader",
        "email": "fady@mellanox.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200614084348.22404-2-fady@mellanox.com/mbox/",
    "series": [
        {
            "id": 10450,
            "url": "http://patches.dpdk.org/api/series/10450/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10450",
            "date": "2020-06-14T08:43:46",
            "name": "eal timer split and implementation for Windows",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/10450/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71507/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/71507/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0C598A04A3;\n\tSun, 14 Jun 2020 10:44:00 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B20194C87;\n\tSun, 14 Jun 2020 10:43:59 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id EF2C14C7A\n for <dev@dpdk.org>; Sun, 14 Jun 2020 10:43:57 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n fady@mellanox.com) with SMTP; 14 Jun 2020 11:43:52 +0300",
            "from l-wincomp04-vm.labs.mlnx (l-wincomp04-vm.mtl.labs.mlnx\n [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 05E8hqhh027482;\n Sun, 14 Jun 2020 11:43:52 +0300"
        ],
        "From": "Fady Bader <fady@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "fady@mellanox.com, thomas@monjalon.net, tbashar@mellanox.com,\n talshn@mellanox.com, yohadt@mellanox.com, dmitry.kozliuk@gmail.com,\n harini.ramakrishnan@microsoft.com, ocardona@microsoft.com,\n anand.rawat@intel.com, ranjit.menon@intel.com",
        "Date": "Sun, 14 Jun 2020 11:43:46 +0300",
        "Message-Id": "<20200614084348.22404-2-fady@mellanox.com>",
        "X-Mailer": "git-send-email 2.16.1.windows.4",
        "In-Reply-To": "<20200614084348.22404-1-fady@mellanox.com>",
        "References": "<20200614084348.22404-1-fady@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH v8 1/3] timer: move from common to Unix directory",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "Eal common timer doesn't compile under Windows.\n\nCompilation log:\nerror LNK2019:\nunresolved external symbol nanosleep referenced in function\nrte_delay_us_sleep\nerror LNK2019:\nunresolved external symbol get_tsc_freq referenced in function set_tsc_freq\nerror LNK2019:\nunresolved external symbol sleep referenced in function set_tsc_freq\n\nThe reason was that some functions called POSIX functions.\nThe solution was to move POSIX dependent functions from common to Unix.\n\nSigned-off-by: Fady Bader <fady@mellanox.com>\n---\n lib/librte_eal/common/eal_common_timer.c | 22 ----------------------\n lib/librte_eal/freebsd/Makefile          |  4 ++++\n lib/librte_eal/linux/Makefile            |  4 ++++\n lib/librte_eal/meson.build               |  4 ++++\n lib/librte_eal/unix/eal_unix_timer.c     | 29 +++++++++++++++++++++++++++++\n lib/librte_eal/unix/meson.build          |  6 ++++++\n 6 files changed, 47 insertions(+), 22 deletions(-)\n create mode 100644 lib/librte_eal/unix/eal_unix_timer.c\n create mode 100644 lib/librte_eal/unix/meson.build",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c\nindex fa9ee1b22..71e0bd035 100644\n--- a/lib/librte_eal/common/eal_common_timer.c\n+++ b/lib/librte_eal/common/eal_common_timer.c\n@@ -35,28 +35,6 @@ rte_delay_us_block(unsigned int us)\n \t\trte_pause();\n }\n \n-void\n-rte_delay_us_sleep(unsigned int us)\n-{\n-\tstruct timespec wait[2];\n-\tint ind = 0;\n-\n-\twait[0].tv_sec = 0;\n-\tif (us >= US_PER_S) {\n-\t\twait[0].tv_sec = us / US_PER_S;\n-\t\tus -= wait[0].tv_sec * US_PER_S;\n-\t}\n-\twait[0].tv_nsec = 1000 * us;\n-\n-\twhile (nanosleep(&wait[ind], &wait[1 - ind]) && errno == EINTR) {\n-\t\t/*\n-\t\t * Sleep was interrupted. Flip the index, so the 'remainder'\n-\t\t * will become the 'request' for a next call.\n-\t\t */\n-\t\tind = 1 - ind;\n-\t}\n-}\n-\n uint64_t\n rte_get_tsc_hz(void)\n {\ndiff --git a/lib/librte_eal/freebsd/Makefile b/lib/librte_eal/freebsd/Makefile\nindex af95386d4..70ea0de41 100644\n--- a/lib/librte_eal/freebsd/Makefile\n+++ b/lib/librte_eal/freebsd/Makefile\n@@ -8,6 +8,7 @@ LIB = librte_eal.a\n ARCH_DIR ?= $(RTE_ARCH)\n VPATH += $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR)\n VPATH += $(RTE_SDK)/lib/librte_eal/common\n+VPATH += $(RTE_SDK)/lib/librte_eal/unix\n \n CFLAGS += -I$(SRCDIR)/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common\n@@ -74,6 +75,9 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += rte_service.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += rte_random.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += rte_reciprocal.c\n \n+# from unix dir\n+SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += eal_unix_timer.c\n+\n # from arch dir\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += rte_cpuflags.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += rte_hypervisor.c\ndiff --git a/lib/librte_eal/linux/Makefile b/lib/librte_eal/linux/Makefile\nindex 48cc34844..02a0820ac 100644\n--- a/lib/librte_eal/linux/Makefile\n+++ b/lib/librte_eal/linux/Makefile\n@@ -8,6 +8,7 @@ LIB = librte_eal.a\n ARCH_DIR ?= $(RTE_ARCH)\n VPATH += $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR)\n VPATH += $(RTE_SDK)/lib/librte_eal/common\n+VPATH += $(RTE_SDK)/lib/librte_eal/unix\n \n CFLAGS += -I$(SRCDIR)/include\n CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common\n@@ -81,6 +82,9 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += rte_service.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += rte_random.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += rte_reciprocal.c\n \n+# from unix dir\n+SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += eal_unix_timer.c\n+\n # from arch dir\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += rte_cpuflags.c\n SRCS-$(CONFIG_RTE_EXEC_ENV_LINUX) += rte_hypervisor.c\ndiff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build\nindex e301f4558..8d492897d 100644\n--- a/lib/librte_eal/meson.build\n+++ b/lib/librte_eal/meson.build\n@@ -6,6 +6,10 @@ subdir('include')\n \n subdir('common')\n \n+if not is_windows\n+\tsubdir('unix')\n+endif\n+\n dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)\n subdir(exec_env)\n \ndiff --git a/lib/librte_eal/unix/eal_unix_timer.c b/lib/librte_eal/unix/eal_unix_timer.c\nnew file mode 100644\nindex 000000000..cc5015910\n--- /dev/null\n+++ b/lib/librte_eal/unix/eal_unix_timer.c\n@@ -0,0 +1,29 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2020 Mellanox Technologies, Ltd\n+ */\n+\n+#include <time.h>\n+\n+#include <rte_cycles.h>\n+\n+void\n+rte_delay_us_sleep(unsigned int us)\n+{\n+\tstruct timespec wait[2];\n+\tint ind = 0;\n+\n+\twait[0].tv_sec = 0;\n+\tif (us >= US_PER_S) {\n+\t\twait[0].tv_sec = us / US_PER_S;\n+\t\tus -= wait[0].tv_sec * US_PER_S;\n+\t}\n+\twait[0].tv_nsec = 1000 * us;\n+\n+\twhile (nanosleep(&wait[ind], &wait[1 - ind]) && errno == EINTR) {\n+\t\t/*\n+\t\t * Sleep was interrupted. Flip the index, so the 'remainder'\n+\t\t * will become the 'request' for a next call.\n+\t\t */\n+\t\tind = 1 - ind;\n+\t}\n+}\ndiff --git a/lib/librte_eal/unix/meson.build b/lib/librte_eal/unix/meson.build\nnew file mode 100644\nindex 000000000..3e43b6d66\n--- /dev/null\n+++ b/lib/librte_eal/unix/meson.build\n@@ -0,0 +1,6 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2020 Mellanox Technologies, Ltd\n+\n+sources += files(\n+\t'eal_unix_timer.c',\n+)\n",
    "prefixes": [
        "v8",
        "1/3"
    ]
}