get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96640,
    "url": "http://patchwork.dpdk.org/api/patches/96640/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1628017291-3756-10-git-send-email-navasile@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": "<1628017291-3756-10-git-send-email-navasile@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1628017291-3756-10-git-send-email-navasile@linux.microsoft.com",
    "date": "2021-08-03T19:01:30",
    "name": "[v13,09/10] eal: add EAL argument for setting thread priority",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ca58aee024592a1b14692c4e146db59e3405b3f4",
    "submitter": {
        "id": 1668,
        "url": "http://patchwork.dpdk.org/api/people/1668/?format=api",
        "name": "Narcisa Ana Maria Vasile",
        "email": "navasile@linux.microsoft.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1628017291-3756-10-git-send-email-navasile@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 18172,
            "url": "http://patchwork.dpdk.org/api/series/18172/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18172",
            "date": "2021-08-03T19:01:21",
            "name": "eal: Add EAL API for threading",
            "version": 13,
            "mbox": "http://patchwork.dpdk.org/series/18172/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96640/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96640/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 0AC6BA0C40;\n\tTue,  3 Aug 2021 21:02:41 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7444A41248;\n\tTue,  3 Aug 2021 21:01:48 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id A3CD4411FB\n for <dev@dpdk.org>; Tue,  3 Aug 2021 21:01:34 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1059)\n id 6BF3F20B03AC; Tue,  3 Aug 2021 12:01:33 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 6BF3F20B03AC",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1628017293;\n bh=JtrW2JI51UX2mRAEmaz2xSvDqnBvKTd/Z490bdUOIeI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=gGFgXvu50DUE1wxI6i0+Ua417nmefCOcPTQA7hGfiHkI1LF4FyQAm5RhGq7/2Nb8c\n LM23iykwa/6NhqmtpfAd6R5Pjj5AkGg0nqU0I95tkLhhW9VdAeB5hFdQBN3/AZsDjN\n UY8Q4JWHO0x74RiKV0rYfmbStdwbZh4a0d2k5FbA=",
        "From": "Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>",
        "To": "dev@dpdk.org, thomas@monjalon.net, dmitry.kozliuk@gmail.com,\n khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com,\n roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com",
        "Cc": "bruce.richardson@intel.com, david.marchand@redhat.com,\n pallavi.kadam@intel.com",
        "Date": "Tue,  3 Aug 2021 12:01:30 -0700",
        "Message-Id": "<1628017291-3756-10-git-send-email-navasile@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1628017291-3756-1-git-send-email-navasile@linux.microsoft.com>",
        "References": "<1627925546-29982-1-git-send-email-navasile@linux.microsoft.com>\n <1628017291-3756-1-git-send-email-navasile@linux.microsoft.com>",
        "Subject": "[dpdk-dev] [PATCH v13 09/10] eal: add EAL argument for setting\n thread priority",
        "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": "From: Narcisa Vasile <navasile@microsoft.com>\n\nAllow the user to choose the thread priority through an EAL\ncommand line argument.\n\nThe user can choose thread priority through an EAL parameter,\nwhen starting an application.  If EAL parameter is not used,\nthe per-platform default value for thread priority is used.\nOtherwise administrator has an option to set one of available options:\n --thread-prio normal\n --thread-prio realtime\n\n Example:\n./dpdk-l2fwd -l 0-3 -n 4 --thread-prio normal -- -q 8 -p ffff\n\nSigned-off-by: Narcisa Vasile <navasile@microsoft.com>\n---\n lib/eal/common/eal_common_options.c | 28 +++++++++++++++++++++++++++-\n lib/eal/common/eal_internal_cfg.h   |  2 ++\n lib/eal/common/eal_options.h        |  2 ++\n 3 files changed, 31 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex ff5861b5f3..9d29696b84 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -107,6 +107,7 @@ eal_long_options[] = {\n \t{OPT_TELEMETRY,         0, NULL, OPT_TELEMETRY_NUM        },\n \t{OPT_NO_TELEMETRY,      0, NULL, OPT_NO_TELEMETRY_NUM     },\n \t{OPT_FORCE_MAX_SIMD_BITWIDTH, 1, NULL, OPT_FORCE_MAX_SIMD_BITWIDTH_NUM},\n+\t{OPT_THREAD_PRIORITY,   1, NULL, OPT_THREAD_PRIORITY_NUM},\n \n \t/* legacy options that will be removed in future */\n \t{OPT_PCI_BLACKLIST,     1, NULL, OPT_PCI_BLACKLIST_NUM    },\n@@ -1412,6 +1413,24 @@ eal_parse_simd_bitwidth(const char *arg)\n \treturn 0;\n }\n \n+static int\n+eal_parse_thread_priority(const char *arg)\n+{\n+\tstruct internal_config *internal_conf =\n+\t\teal_get_internal_configuration();\n+\tenum rte_thread_priority priority;\n+\n+\tif (!strncmp(\"normal\", arg, sizeof(\"normal\")))\n+\t\tpriority = RTE_THREAD_PRIORITY_NORMAL;\n+\telse if (!strncmp(\"realtime\", arg, sizeof(\"realtime\")))\n+\t\tpriority = RTE_THREAD_PRIORITY_REALTIME_CRITICAL;\n+\telse\n+\t\treturn -1;\n+\n+\tinternal_conf->thread_priority = priority;\n+\treturn 0;\n+}\n+\n static int\n eal_parse_base_virtaddr(const char *arg)\n {\n@@ -1825,7 +1844,13 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\t\treturn -1;\n \t\t}\n \t\tbreak;\n-\n+\tcase OPT_THREAD_PRIORITY_NUM:\n+\t\tif (eal_parse_thread_priority(optarg) < 0) {\n+\t\t\tRTE_LOG(ERR, EAL, \"invalid parameter for --\"\n+\t\t\t\t\tOPT_THREAD_PRIORITY \"\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tbreak;\n \t/* don't know what to do, leave this to caller */\n \tdefault:\n \t\treturn 1;\n@@ -2088,6 +2113,7 @@ eal_common_usage(void)\n \t       \"                      (can be used multiple times)\\n\"\n \t       \"  --\"OPT_VMWARE_TSC_MAP\"    Use VMware TSC map instead of native RDTSC\\n\"\n \t       \"  --\"OPT_PROC_TYPE\"         Type of this process (primary|secondary|auto)\\n\"\n+\t       \"  --\"OPT_THREAD_PRIORITY\"   Set threads priority (normal|realtime)\\n\"\n #ifndef RTE_EXEC_ENV_WINDOWS\n \t       \"  --\"OPT_SYSLOG\"            Set syslog facility\\n\"\n #endif\ndiff --git a/lib/eal/common/eal_internal_cfg.h b/lib/eal/common/eal_internal_cfg.h\nindex d6c0470eb8..b2996cd65b 100644\n--- a/lib/eal/common/eal_internal_cfg.h\n+++ b/lib/eal/common/eal_internal_cfg.h\n@@ -94,6 +94,8 @@ struct internal_config {\n \tunsigned int no_telemetry; /**< true to disable Telemetry */\n \tstruct simd_bitwidth max_simd_bitwidth;\n \t/**< max simd bitwidth path to use */\n+\tenum rte_thread_priority thread_priority;\n+\t/**< thread priority to configure */\n };\n \n void eal_reset_internal_config(struct internal_config *internal_cfg);\ndiff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h\nindex 7b348e707f..9f5b209f64 100644\n--- a/lib/eal/common/eal_options.h\n+++ b/lib/eal/common/eal_options.h\n@@ -93,6 +93,8 @@ enum {\n \tOPT_NO_TELEMETRY_NUM,\n #define OPT_FORCE_MAX_SIMD_BITWIDTH  \"force-max-simd-bitwidth\"\n \tOPT_FORCE_MAX_SIMD_BITWIDTH_NUM,\n+#define OPT_THREAD_PRIORITY          \"thread-prio\"\n+\tOPT_THREAD_PRIORITY_NUM,\n \n \t/* legacy option that will be removed in future */\n #define OPT_PCI_BLACKLIST     \"pci-blacklist\"\n",
    "prefixes": [
        "v13",
        "09/10"
    ]
}