Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/89795/?format=api
http://patches.dpdk.org/api/patches/89795/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1616644026-25432-10-git-send-email-navasile@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": "<1616644026-25432-10-git-send-email-navasile@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1616644026-25432-10-git-send-email-navasile@linux.microsoft.com", "date": "2021-03-25T03:47:05", "name": "[v3,09/10] eal: add EAL argument for setting thread priority", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d9561f52226f4c0824a61e992d96a33cca48b515", "submitter": { "id": 1668, "url": "http://patches.dpdk.org/api/people/1668/?format=api", "name": "Narcisa Ana Maria Vasile", "email": "navasile@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/1616644026-25432-10-git-send-email-navasile@linux.microsoft.com/mbox/", "series": [ { "id": 15865, "url": "http://patches.dpdk.org/api/series/15865/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15865", "date": "2021-03-25T03:46:59", "name": "eal: Add new API for threading", "version": 3, "mbox": "http://patches.dpdk.org/series/15865/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/89795/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/89795/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 6EDA4A0A02;\n\tThu, 25 Mar 2021 04:48:29 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E9F3B140E42;\n\tThu, 25 Mar 2021 04:47:40 +0100 (CET)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id B9276140DE1\n for <dev@dpdk.org>; Thu, 25 Mar 2021 04:47:27 +0100 (CET)", "by linux.microsoft.com (Postfix, from userid 1059)\n id 6E94520B568A; Wed, 24 Mar 2021 20:47:26 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 6E94520B568A", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1616644046;\n bh=L2H3IvMBaWjLtKIcf8peeML1Im0QF2GdhVl1EjD68h4=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=MCJ63XSzPARQa2opczQMLQl9bU40rAs9ceKF9z97iIkQ4ML6ROgabKpsvzQKs3+om\n 8wsJz5bOKB9NcXYHtcYdIJPhzpHjVbxI89Sz/e7nInYuNJdB8d0lWSMeU8P4tK9jwy\n Bxetv+Ryna7UPuui5PHRFUO5TIb1DOmDM5d81T0U=", "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": "Wed, 24 Mar 2021 20:47:05 -0700", "Message-Id": "<1616644026-25432-10-git-send-email-navasile@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1616644026-25432-1-git-send-email-navasile@linux.microsoft.com>", "References": "<1616458835-28502-1-git-send-email-navasile@linux.microsoft.com>\n <1616644026-25432-1-git-send-email-navasile@linux.microsoft.com>", "Subject": "[dpdk-dev] [PATCH v3 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 select the thread priority to be either 'normal'\nor 'critical':\n--thread-prio normal\n--thread-prio realtime\n\nSigned-off-by: Narcisa Vasile <navasile@microsoft.com>\n---\n lib/librte_eal/common/eal_common_options.c | 28 +++++++++++++++++++++-\n lib/librte_eal/common/eal_internal_cfg.h | 2 ++\n lib/librte_eal/common/eal_options.h | 2 ++\n 3 files changed, 31 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 622c7bc42..287a89a75 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -106,6 +106,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@@ -1383,6 +1384,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@@ -1796,7 +1815,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@@ -2059,6 +2084,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/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h\nindex 51dbe86e2..7ab1d0008 100644\n--- a/lib/librte_eal/common/eal_internal_cfg.h\n+++ b/lib/librte_eal/common/eal_internal_cfg.h\n@@ -93,6 +93,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/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex 7b348e707..9f5b209f6 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_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": [ "v3", "09/10" ] }{ "id": 89795, "url": "