get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97075,
    "url": "http://patchwork.dpdk.org/api/patches/97075/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1629306834-6277-6-git-send-email-jizh@linux.microsoft.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1629306834-6277-6-git-send-email-jizh@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1629306834-6277-6-git-send-email-jizh@linux.microsoft.com",
    "date": "2021-08-18T17:13:46",
    "name": "[v2,05/13] app/test: replace POSIX specific code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d3a8499cefb1ee4bef648008c705ae97e5f4e1aa",
    "submitter": {
        "id": 1934,
        "url": "http://patchwork.dpdk.org/api/people/1934/?format=api",
        "name": "Jie Zhou",
        "email": "jizh@linux.microsoft.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1629306834-6277-6-git-send-email-jizh@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 18337,
            "url": "http://patchwork.dpdk.org/api/series/18337/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18337",
            "date": "2021-08-18T17:13:42",
            "name": "app/test: enable subset of tests on Windows",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/18337/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97075/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97075/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 E65B6A0C4C;\n\tWed, 18 Aug 2021 19:14:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4E23C41227;\n\tWed, 18 Aug 2021 19:14:12 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 5AA24410F2\n for <dev@dpdk.org>; Wed, 18 Aug 2021 19:14:00 +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 371B320C3344;\n Wed, 18 Aug 2021 10:13:59 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 371B320C3344",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1629306839;\n bh=LoYjurWVbdyOFVZ6NarAwNIoqZuc/m1U1nj9szb1gJk=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=gwKN0ijVfRUmrvFpTSls/bJdPJRYSuhvGo4SB/1YzSnu2J7nBzqJQJrcQUVTgtviG\n yTWyjVhFUkuPExG5NQkjVsnftWfKpwKwThRTMuqR1+yL4vZZti6oj8VrZPB8xfi1mR\n inyLhoCDjK2Nnc0O/2/tZkWn6a/McbNajfzbRxQQ=",
        "From": "Jie Zhou <jizh@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "dmitry.kozliuk@gmail.com, roretzla@microsoft.com,\n navasile@linux.microsoft.com, dmitrym@microsoft.com,\n pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net,\n aconole@redhat.com",
        "Date": "Wed, 18 Aug 2021 10:13:46 -0700",
        "Message-Id": "<1629306834-6277-6-git-send-email-jizh@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1629306834-6277-1-git-send-email-jizh@linux.microsoft.com>",
        "References": "<1629267476-901-1-git-send-email-jizh@linux.microsoft.com>\n <1629306834-6277-1-git-send-email-jizh@linux.microsoft.com>",
        "Subject": "[dpdk-dev] [PATCH v2 05/13] app/test: replace POSIX specific code",
        "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": "- Include rte_os_shim.h\n- Replace sleep and usleep with rte_delay_us_sleep\n- #ifndef RTE_EXEC_ENV_WINDOWS for POSIX code only\n\nSigned-off-by: Jie Zhou <jizh@linux.microsoft.com>\n---\n app/test/packet_burst_generator.c | 1 +\n app/test/process.h                | 4 +++-\n app/test/test.c                   | 4 ++++\n app/test/test_byteorder.c         | 2 +-\n app/test/test_cmdline.c           | 2 ++\n app/test/test_crc.c               | 1 -\n app/test/test_mp_secondary.c      | 2 ++\n app/test/test_pmd_perf.c          | 6 +++++-\n app/test/test_ring_stress.c       | 3 ++-\n app/test/test_ring_stress_impl.h  | 2 +-\n app/test/test_telemetry_data.c    | 2 ++\n 11 files changed, 23 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c\nindex 0fd7290b0e..2da4106ad6 100644\n--- a/app/test/packet_burst_generator.c\n+++ b/app/test/packet_burst_generator.c\n@@ -5,6 +5,7 @@\n #include <rte_byteorder.h>\n #include <rte_mbuf.h>\n #include <rte_ip.h>\n+#include <rte_os_shim.h>\n \n #include \"packet_burst_generator.h\"\n \ndiff --git a/app/test/process.h b/app/test/process.h\nindex 5b10cf64df..1f073b9c5c 100644\n--- a/app/test/process.h\n+++ b/app/test/process.h\n@@ -7,12 +7,14 @@\n \n #include <errno.h>  /* errno */\n #include <limits.h> /* PATH_MAX */\n+#ifndef RTE_EXEC_ENV_WINDOWS\n #include <libgen.h> /* basename et al */\n+#include <sys/wait.h>\n+#endif\n #include <stdlib.h> /* NULL */\n #include <string.h> /* strerror */\n #include <unistd.h> /* readlink */\n #include <dirent.h>\n-#include <sys/wait.h>\n \n #include <rte_string_fns.h> /* strlcpy */\n \ndiff --git a/app/test/test.c b/app/test/test.c\nindex 52fac24213..e8f8ce8335 100644\n--- a/app/test/test.c\n+++ b/app/test/test.c\n@@ -62,7 +62,9 @@ do_recursive_call(void)\n \t\tconst char *env_var;\n \t\tint (*action_fn)(void);\n \t} actions[] =  {\n+#ifndef RTE_EXEC_ENV_WINDOWS\n \t\t\t{ \"run_secondary_instances\", test_mp_secondary },\n+#endif\n #ifdef RTE_LIB_PDUMP\n #ifdef RTE_NET_RING\n \t\t\t{ \"run_pdump_server_tests\", test_pdump },\n@@ -81,7 +83,9 @@ do_recursive_call(void)\n \t\t\t{ \"test_file_prefix\", no_action },\n \t\t\t{ \"test_no_huge_flag\", no_action },\n #ifdef RTE_LIB_TIMER\n+#ifndef RTE_EXEC_ENV_WINDOWS\n \t\t\t{ \"timer_secondary_spawn_wait\", test_timer_secondary },\n+#endif\n #endif\n \t};\n \ndiff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c\nindex 03c08d9abf..de14ed539e 100644\n--- a/app/test/test_byteorder.c\n+++ b/app/test/test_byteorder.c\n@@ -46,7 +46,7 @@ test_byteorder(void)\n \t\treturn -1;\n \n \tres_u16 = rte_bswap16(0x1337);\n-\tprintf(\"const %\"PRIx16\" -> %\"PRIx16\"\\n\", 0x1337, res_u16);\n+\tprintf(\"const %\"PRIx16\" -> %\"PRIx16\"\\n\", (uint16_t)0x1337, res_u16);\n \tif (res_u16 != 0x3713)\n \t\treturn -1;\n \ndiff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c\nindex 115bee966d..9a76bd299f 100644\n--- a/app/test/test_cmdline.c\n+++ b/app/test/test_cmdline.c\n@@ -31,6 +31,7 @@ test_cmdline(void)\n \t\treturn -1;\n \tif (test_parse_num_invalid_param() < 0)\n \t\treturn -1;\n+#ifndef RTE_EXEC_ENV_WINDOWS\n \tprintf(\"Testing parsing IP addresses...\\n\");\n \tif (test_parse_ipaddr_valid() < 0)\n \t\treturn -1;\n@@ -38,6 +39,7 @@ test_cmdline(void)\n \t\treturn -1;\n \tif (test_parse_ipaddr_invalid_param() < 0)\n \t\treturn -1;\n+#endif\n \tprintf(\"Testing parsing strings...\\n\");\n \tif (test_parse_string_valid() < 0)\n \t\treturn -1;\ndiff --git a/app/test/test_crc.c b/app/test/test_crc.c\nindex bf1d344359..0ed080e482 100644\n--- a/app/test/test_crc.c\n+++ b/app/test/test_crc.c\n@@ -14,7 +14,6 @@\n #define CRC32_VEC_LEN2     348\n #define CRC16_VEC_LEN1     12\n #define CRC16_VEC_LEN2     2\n-#define LINE_LEN           75\n \n /* CRC test vector */\n static const uint8_t crc_vec[CRC_VEC_LEN] = {\ndiff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c\nindex 5b6f05dbb1..da035348bd 100644\n--- a/app/test/test_mp_secondary.c\n+++ b/app/test/test_mp_secondary.c\n@@ -14,7 +14,9 @@\n #include <errno.h>\n #include <string.h>\n #include <unistd.h>\n+#ifndef RTE_EXEC_ENV_WINDOWS\n #include <sys/wait.h>\n+#endif\n #include <libgen.h>\n #include <dirent.h>\n #include <limits.h>\ndiff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c\nindex 3a248d512c..8698d24eac 100644\n--- a/app/test/test_pmd_perf.c\n+++ b/app/test/test_pmd_perf.c\n@@ -298,6 +298,7 @@ reset_count(void)\n \tidle = 0;\n }\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n static void\n stats_display(uint16_t port_id)\n {\n@@ -327,6 +328,7 @@ signal_handler(int signum)\n \tif (signum == SIGUSR2)\n \t\tstats_display(0);\n }\n+#endif\n \n struct rte_mbuf **tx_burst;\n \n@@ -638,7 +640,7 @@ exec_burst(uint32_t flags, int lcore)\n \t\ti = (i >= conf->nb_ports - 1) ? 0 : (i + 1);\n \t}\n \n-\tsleep(5);\n+\trte_delay_us(5 * US_PER_S);\n \n \t/* only when polling second  */\n \tif (flags == SC_BURST_XMIT_FIRST)\n@@ -669,8 +671,10 @@ test_pmd_perf(void)\n \n \tprintf(\"Start PMD RXTX cycles cost test.\\n\");\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n \tsignal(SIGUSR1, signal_handler);\n \tsignal(SIGUSR2, signal_handler);\n+#endif\n \n \tnb_ports = rte_eth_dev_count_avail();\n \tif (nb_ports < NB_ETHPORTS_USED) {\ndiff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c\nindex 1af45e0fc8..ce3535c6b2 100644\n--- a/app/test/test_ring_stress.c\n+++ b/app/test/test_ring_stress.c\n@@ -43,9 +43,10 @@ test_ring_stress(void)\n \tn += test_ring_rts_stress.nb_case;\n \tk += run_test(&test_ring_rts_stress);\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n \tn += test_ring_hts_stress.nb_case;\n \tk += run_test(&test_ring_hts_stress);\n-\n+#endif\n \tn += test_ring_mt_peek_stress.nb_case;\n \tk += run_test(&test_ring_mt_peek_stress);\n \ndiff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h\nindex f9ca63b908..feb4b96ea1 100644\n--- a/app/test/test_ring_stress_impl.h\n+++ b/app/test/test_ring_stress_impl.h\n@@ -359,7 +359,7 @@ test_mt1(int (*test)(void *))\n \twrk_cmd = WRK_CMD_RUN;\n \trte_smp_wmb();\n \n-\tusleep(run_time * US_PER_S);\n+\trte_delay_us(run_time * US_PER_S);\n \n \t/* signal worker to start test */\n \twrk_cmd = WRK_CMD_STOP;\ndiff --git a/app/test/test_telemetry_data.c b/app/test/test_telemetry_data.c\nindex f34d691265..a0450337ea 100644\n--- a/app/test/test_telemetry_data.c\n+++ b/app/test/test_telemetry_data.c\n@@ -4,7 +4,9 @@\n \n #include <string.h>\n #include <sys/socket.h>\n+#ifndef RTE_EXEC_ENV_WINDOWS\n #include <sys/un.h>\n+#endif\n #include <unistd.h>\n #include <limits.h>\n \n",
    "prefixes": [
        "v2",
        "05/13"
    ]
}