Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80198/?format=api
http://patchwork.dpdk.org/api/patches/80198/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/e837c82c3ac808bfe3c491efe76ce76340c42112.1602258833.git.anatoly.burakov@intel.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": "<e837c82c3ac808bfe3c491efe76ce76340c42112.1602258833.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/e837c82c3ac808bfe3c491efe76ce76340c42112.1602258833.git.anatoly.burakov@intel.com", "date": "2020-10-09T16:02:26", "name": "[v5,09/10] examples/l3fwd-power: enable PMD power mgmt", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e860de677f3f0662f860e25bff1466611e4042a7", "submitter": { "id": 4, "url": "http://patchwork.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.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/e837c82c3ac808bfe3c491efe76ce76340c42112.1602258833.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 12833, "url": "http://patchwork.dpdk.org/api/series/12833/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12833", "date": "2020-10-09T16:02:18", "name": "[v5,01/10] eal: add new x86 cpuid support for WAITPKG", "version": 5, "mbox": "http://patchwork.dpdk.org/series/12833/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/80198/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/80198/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 95E2CA04BC;\n\tFri, 9 Oct 2020 18:05:44 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 411831D8D8;\n\tFri, 9 Oct 2020 18:03:02 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id D4D2B1D8D1\n for <dev@dpdk.org>; Fri, 9 Oct 2020 18:02:56 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Oct 2020 09:02:56 -0700", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by orsmga005.jf.intel.com with ESMTP; 09 Oct 2020 09:02:53 -0700" ], "IronPort-SDR": [ "\n KZNn7GMa3lL7DmP+YZRfuaRG2yRaP6pAN2SHUl7nrF2IlFXjGS6ogdmBCfE53ZJb2Kesvbuu+R\n ajYPjuEUzCWg==", "\n jvJ1MYtzXKBUikxbD4LEsIhad2qHblId6ByHnxYXtTbUeDR/MUjqdhjVKr6RJy1cCbXBpP5Apw\n 63sXdGDGSOng==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9769\"; a=\"250197444\"", "E=Sophos;i=\"5.77,355,1596524400\"; d=\"scan'208\";a=\"250197444\"", "E=Sophos;i=\"5.77,355,1596524400\"; d=\"scan'208\";a=\"528981975\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Liang Ma <liang.j.ma@intel.com>, David Hunt <david.hunt@intel.com>,\n konstantin.ananyev@intel.com, jerinjacobk@gmail.com,\n bruce.richardson@intel.com, thomas@monjalon.net,\n timothy.mcdaniel@intel.com, gage.eads@intel.com, chris.macnamara@intel.com", "Date": "Fri, 9 Oct 2020 17:02:26 +0100", "Message-Id": "\n <e837c82c3ac808bfe3c491efe76ce76340c42112.1602258833.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "\n <532f45c5d79b4c30a919553d322bb66e91534466.1602258833.git.anatoly.burakov@intel.com>", "<1601647919-25312-1-git-send-email-liang.j.ma@intel.com>" ], "References": [ "\n <532f45c5d79b4c30a919553d322bb66e91534466.1602258833.git.anatoly.burakov@intel.com>", "<1601647919-25312-1-git-send-email-liang.j.ma@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v5 09/10] examples/l3fwd-power: enable PMD power\n\tmgmt", "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": "From: Liang Ma <liang.j.ma@intel.com>\n\nAdd PMD power management feature support to l3fwd-power sample app.\n\nSigned-off-by: Liang Ma <liang.j.ma@intel.com>\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n v5:\n - Moved doc update here\n - Some minor formatting fixes\n\n .../sample_app_ug/l3_forward_power_man.rst | 13 ++++++\n examples/l3fwd-power/main.c | 41 ++++++++++++++++++-\n 2 files changed, 53 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst\nindex 0cc6f2e62e..8722fbaeaa 100644\n--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst\n+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst\n@@ -109,6 +109,8 @@ where,\n \n * --telemetry: Telemetry mode.\n \n+* --pmd-mgmt: PMD power management mode.\n+\n See :doc:`l3_forward` for details.\n The L3fwd-power example reuses the L3fwd command line options.\n \n@@ -459,3 +461,14 @@ reference cycles and accordingly busy rate is set to either 0% or\n \n The new stats ``empty_poll`` , ``full_poll`` and ``busy_percent`` can be viewed by running the script\n ``/usertools/dpdk-telemetry-client.py`` and selecting the menu option ``Send for global Metrics``.\n+\n+PMD power management Mode\n+-------------------------\n+\n+The PMD power management mode support for ``l3fwd-power`` is a standalone mode, in this mode\n+``l3fwd-power`` does simple l3fwding along with enable the power saving scheme on specific\n+port/queue/lcore. Main purpose for this mode is to demonstrate how to use the PMD power management API.\n+\n+.. code-block:: console\n+\n+ ./examples/l3fwd-power/build/l3fwd-power --pmd-mgmt -l 1-3 -- -p 0x0f --config=\"(0,0,2),(0,1,3)\"\ndiff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c\nindex d0e6c9bd77..af64dd521f 100644\n--- a/examples/l3fwd-power/main.c\n+++ b/examples/l3fwd-power/main.c\n@@ -47,6 +47,7 @@\n #include <rte_power_empty_poll.h>\n #include <rte_metrics.h>\n #include <rte_telemetry.h>\n+#include <rte_power_pmd_mgmt.h>\n \n #include \"perf_core.h\"\n #include \"main.h\"\n@@ -199,7 +200,8 @@ enum appmode {\n \tAPP_MODE_LEGACY,\n \tAPP_MODE_EMPTY_POLL,\n \tAPP_MODE_TELEMETRY,\n-\tAPP_MODE_INTERRUPT\n+\tAPP_MODE_INTERRUPT,\n+\tAPP_MODE_PMD_MGMT\n };\n \n enum appmode app_mode;\n@@ -1750,6 +1752,7 @@ parse_ep_config(const char *q_arg)\n #define CMD_LINE_OPT_EMPTY_POLL \"empty-poll\"\n #define CMD_LINE_OPT_INTERRUPT_ONLY \"interrupt-only\"\n #define CMD_LINE_OPT_TELEMETRY \"telemetry\"\n+#define CMD_LINE_OPT_PMD_MGMT \"pmd-mgmt\"\n \n /* Parse the argument given in the command line of the application */\n static int\n@@ -1771,6 +1774,7 @@ parse_args(int argc, char **argv)\n \t\t{CMD_LINE_OPT_LEGACY, 0, 0, 0},\n \t\t{CMD_LINE_OPT_TELEMETRY, 0, 0, 0},\n \t\t{CMD_LINE_OPT_INTERRUPT_ONLY, 0, 0, 0},\n+\t\t{CMD_LINE_OPT_PMD_MGMT, 0, 0, 0},\n \t\t{NULL, 0, 0, 0}\n \t};\n \n@@ -1881,6 +1885,16 @@ parse_args(int argc, char **argv)\n \t\t\t\tprintf(\"telemetry mode is enabled\\n\");\n \t\t\t}\n \n+\t\t\tif (!strncmp(lgopts[option_index].name,\n+\t\t\t\t\tCMD_LINE_OPT_PMD_MGMT,\n+\t\t\t\t\tsizeof(CMD_LINE_OPT_PMD_MGMT))) {\n+\t\t\t\tif (app_mode != APP_MODE_DEFAULT) {\n+\t\t\t\t\tprintf(\" power mgmt mode is mutually exclusive with other modes\\n\");\n+\t\t\t\t\treturn -1;\n+\t\t\t\t}\n+\t\t\t\tapp_mode = APP_MODE_PMD_MGMT;\n+\t\t\t\tprintf(\"PMD power mgmt mode is enabled\\n\");\n+\t\t\t}\n \t\t\tif (!strncmp(lgopts[option_index].name,\n \t\t\t\t\tCMD_LINE_OPT_INTERRUPT_ONLY,\n \t\t\t\t\tsizeof(CMD_LINE_OPT_INTERRUPT_ONLY))) {\n@@ -2437,6 +2451,8 @@ mode_to_str(enum appmode mode)\n \t\treturn \"telemetry\";\n \tcase APP_MODE_INTERRUPT:\n \t\treturn \"interrupt-only\";\n+\tcase APP_MODE_PMD_MGMT:\n+\t\treturn \"pmd mgmt\";\n \tdefault:\n \t\treturn \"invalid\";\n \t}\n@@ -2705,6 +2721,12 @@ main(int argc, char **argv)\n \t\t\t} else if (!check_ptype(portid))\n \t\t\t\trte_exit(EXIT_FAILURE,\n \t\t\t\t\t \"PMD can not provide needed ptypes\\n\");\n+\t\t\tif (app_mode == APP_MODE_PMD_MGMT) {\n+\t\t\t\trte_power_pmd_mgmt_queue_enable(lcore_id,\n+\t\t\t\t\t\t\tportid, queueid,\n+\t\t\t\t\t\tRTE_POWER_MGMT_TYPE_SCALE);\n+\n+\t\t\t}\n \t\t}\n \t}\n \n@@ -2790,6 +2812,9 @@ main(int argc, char **argv)\n \t\t\t\t\t\tSKIP_MASTER);\n \t} else if (app_mode == APP_MODE_INTERRUPT) {\n \t\trte_eal_mp_remote_launch(main_intr_loop, NULL, CALL_MASTER);\n+\t} else if (app_mode == APP_MODE_PMD_MGMT) {\n+\t\trte_eal_mp_remote_launch(main_telemetry_loop, NULL,\n+\t\t\t\t\t CALL_MASTER);\n \t}\n \n \tif (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY)\n@@ -2812,6 +2837,20 @@ main(int argc, char **argv)\n \tif (app_mode == APP_MODE_EMPTY_POLL)\n \t\trte_power_empty_poll_stat_free();\n \n+\tif (app_mode == APP_MODE_PMD_MGMT) {\n+\t\tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n+\t\t\tif (rte_lcore_is_enabled(lcore_id) == 0)\n+\t\t\t\tcontinue;\n+\t\t\tqconf = &lcore_conf[lcore_id];\n+\t\t\tfor (queue = 0; queue < qconf->n_rx_queue; ++queue) {\n+\t\t\t\tportid = qconf->rx_queue_list[queue].port_id;\n+\t\t\t\tqueueid = qconf->rx_queue_list[queue].queue_id;\n+\t\t\t\trte_power_pmd_mgmt_queue_disable(lcore_id,\n+\t\t\t\t\t\t\tportid, queueid);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n \tif ((app_mode == APP_MODE_LEGACY || app_mode == APP_MODE_EMPTY_POLL) &&\n \t\t\tdeinit_power_library())\n \t\trte_exit(EXIT_FAILURE, \"deinit_power_library failed\\n\");\n", "prefixes": [ "v5", "09/10" ] }{ "id": 80198, "url": "