Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80897/?format=api
http://patches.dpdk.org/api/patches/80897/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/6bb55b9d5310881e0d8d47321dc7f99d1f030c59.1602763439.git.anatoly.burakov@intel.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": "<6bb55b9d5310881e0d8d47321dc7f99d1f030c59.1602763439.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/6bb55b9d5310881e0d8d47321dc7f99d1f030c59.1602763439.git.anatoly.burakov@intel.com", "date": "2020-10-15T12:04:14", "name": "[v7,09/10] examples/l3fwd-power: enable PMD power mgmt", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "17030ee9f5ee8875bdd6edb301aec6554985423b", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.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/6bb55b9d5310881e0d8d47321dc7f99d1f030c59.1602763439.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 13006, "url": "http://patches.dpdk.org/api/series/13006/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13006", "date": "2020-10-15T12:04:06", "name": "[v7,01/10] eal: add new x86 cpuid support for WAITPKG", "version": 7, "mbox": "http://patches.dpdk.org/series/13006/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/80897/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/80897/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 9D15FA04DB;\n\tThu, 15 Oct 2020 14:07:58 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1ED551E895;\n\tThu, 15 Oct 2020 14:05:19 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 674F61E877\n for <dev@dpdk.org>; Thu, 15 Oct 2020 14:05:09 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Oct 2020 05:04:55 -0700", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by orsmga003.jf.intel.com with ESMTP; 15 Oct 2020 05:04:51 -0700" ], "IronPort-SDR": [ "\n Fp8/xlFFmgF8feP9+pbdTWHdPaqVUj4NKW6S4UqvlGHLCfiMMsb77qjabnKP4QwXhDVc23HgxQ\n uv8mKEXT854g==", "\n nd0T87eheTKR6X/nF264LGnsZSyVI37NUhIDv6ThVXUKH99AQXhB9sACppDuoJK2dDCvlc/3iH\n rljSDILmLfiQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9774\"; a=\"227977228\"", "E=Sophos;i=\"5.77,378,1596524400\"; d=\"scan'208\";a=\"227977228\"", "E=Sophos;i=\"5.77,378,1596524400\"; d=\"scan'208\";a=\"314485662\"" ], "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": "Thu, 15 Oct 2020 13:04:14 +0100", "Message-Id": "\n <6bb55b9d5310881e0d8d47321dc7f99d1f030c59.1602763439.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "\n <da3fe4e5bbe976882c56a71d20a9055c1600e6aa.1602763439.git.anatoly.burakov@intel.com>", "\n <c6b56362a7c4773b7fcb0e788ecc852caa4192fa.1602682206.git.anatoly.burakov@intel.com>" ], "References": [ "\n <da3fe4e5bbe976882c56a71d20a9055c1600e6aa.1602763439.git.anatoly.burakov@intel.com>", "\n <c6b56362a7c4773b7fcb0e788ecc852caa4192fa.1602682206.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v7 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>\nAcked-by: David Hunt <david.hunt@intel.com>\n---\n\nNotes:\n v6:\n - Fixed typos in documentation\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..2767fb91aa 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+ ./build/examples/dpdk-l3fwd-power -l 1-3 -- --pmd-mgmt -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": [ "v7", "09/10" ] }{ "id": 80897, "url": "