Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/85331/?format=api
https://patches.dpdk.org/api/patches/85331/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/8f06ba8347a3b464eba41ee4985b83934422c89a.1608213657.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "https://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": "<8f06ba8347a3b464eba41ee4985b83934422c89a.1608213657.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/8f06ba8347a3b464eba41ee4985b83934422c89a.1608213657.git.anatoly.burakov@intel.com", "date": "2020-12-17T14:05:36", "name": "[v12,06/11] ethdev: add simple power management API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "c63dd4f9edfac702c23960f18de859fdf138dc87", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/8f06ba8347a3b464eba41ee4985b83934422c89a.1608213657.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 14349, "url": "https://patches.dpdk.org/api/series/14349/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14349", "date": "2020-12-17T14:05:30", "name": "Add PMD power management", "version": 12, "mbox": "https://patches.dpdk.org/series/14349/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/85331/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/85331/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 6836DA09F6;\n\tThu, 17 Dec 2020 15:08:31 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D9E9BCA65;\n\tThu, 17 Dec 2020 15:06:27 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 9A04ECA1A\n for <dev@dpdk.org>; Thu, 17 Dec 2020 15:06:19 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Dec 2020 06:05:59 -0800", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.52])\n by fmsmga006.fm.intel.com with ESMTP; 17 Dec 2020 06:05:56 -0800" ], "IronPort-SDR": [ "\n mI2v9ZK5g66E/XLKb9ULVqk0DmbxeFQpEjdMHTMoUnvxyAcz41wmrPpiZh4FmVJk4mJdpCvugc\n iWNwjtIgVAdg==", "\n /SCX2YnXMtCC105TldYvl5ZgE+lrPdP7XMsxaZvm/4eYFAQYfPE3lCXRdYC/AI7AgA3jDxu9xE\n jDYhtpE2Eeig==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9837\"; a=\"175398827\"", "E=Sophos;i=\"5.78,428,1599548400\"; d=\"scan'208\";a=\"175398827\"", "E=Sophos;i=\"5.78,428,1599548400\"; d=\"scan'208\";a=\"557887808\"" ], "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Liang Ma <liang.j.ma@intel.com>, Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,\n konstantin.ananyev@intel.com, gage.eads@intel.com,\n timothy.mcdaniel@intel.com, david.hunt@intel.com,\n bruce.richardson@intel.com, chris.macnamara@intel.com", "Date": "Thu, 17 Dec 2020 14:05:36 +0000", "Message-Id": "\n <8f06ba8347a3b464eba41ee4985b83934422c89a.1608213657.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": [ "<cover.1608213657.git.anatoly.burakov@intel.com>", "<cover.1608213657.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1608213657.git.anatoly.burakov@intel.com>", "<1604315406-27669-1-git-send-email-liang.j.ma@intel.com>\n <cover.1608213657.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v12 06/11] ethdev: add simple power management API", "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 a simple API to allow getting the monitor conditions for\npower-optimized monitoring of the RX queues from the PMD, as well as\nrelease notes information.\n\nSigned-off-by: Liang Ma <liang.j.ma@intel.com>\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n\nNotes:\n v6:\n - Rebase on top of latest main\n - Ensure the API checks queue ID (Konstantin)\n - Removed accidental inclusion of unrelated release notes\n v5:\n - Bring function format in line with other functions in the file\n - Ensure the API is supported by the driver before calling it (Konstantin)\n\n doc/guides/rel_notes/release_21_02.rst | 4 ++++\n lib/librte_ethdev/rte_ethdev.c | 28 ++++++++++++++++++++++++++\n lib/librte_ethdev/rte_ethdev.h | 25 +++++++++++++++++++++++\n lib/librte_ethdev/rte_ethdev_driver.h | 22 ++++++++++++++++++++\n lib/librte_ethdev/version.map | 3 +++\n 5 files changed, 82 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst\nindex 638f98168b..feb3ff4f06 100644\n--- a/doc/guides/rel_notes/release_21_02.rst\n+++ b/doc/guides/rel_notes/release_21_02.rst\n@@ -55,6 +55,10 @@ New Features\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n+* **ethdev: added 1 new API for PMD power management**\n+\n+ * ``rte_eth_get_monitor_addr()``, to be used in conjunction with\n+ ``rte_power_monitor()`` to enable automatic power management for PMD's.\n \n Removed Items\n -------------\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 17ddacc78d..58f68321ea 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -5115,6 +5115,34 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,\n \t\t dev->dev_ops->tx_burst_mode_get(dev, queue_id, mode));\n }\n \n+int\n+rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,\n+\t\tstruct rte_power_monitor_cond *pmc)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_monitor_addr, -ENOTSUP);\n+\n+\tif (queue_id >= dev->data->nb_tx_queues) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid TX queue_id=%u\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (pmc == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid power monitor condition=%p\\n\",\n+\t\t\t\tpmc);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\treturn eth_err(port_id,\n+\t\tdev->dev_ops->get_monitor_addr(dev->data->rx_queues[queue_id],\n+\t\t\tpmc));\n+}\n+\n int\n rte_eth_dev_set_mc_addr_list(uint16_t port_id,\n \t\t\t struct rte_ether_addr *mc_addr_set,\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex f5f8919186..ca0f91312e 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -157,6 +157,7 @@ extern \"C\" {\n #include <rte_common.h>\n #include <rte_config.h>\n #include <rte_ether.h>\n+#include <rte_power_intrinsics.h>\n \n #include \"rte_ethdev_trace_fp.h\"\n #include \"rte_dev_info.h\"\n@@ -4334,6 +4335,30 @@ __rte_experimental\n int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,\n \tstruct rte_eth_burst_mode *mode);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Retrieve the monitor condition for a given receive queue.\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param queue_id\n+ * The Rx queue on the Ethernet device for which information\n+ * will be retrieved.\n+ * @param pmc\n+ * The pointer point to power-optimized monitoring condition structure.\n+ *\n+ * @return\n+ * - 0: Success.\n+ * -ENOTSUP: Operation not supported.\n+ * -EINVAL: Invalid parameters.\n+ * -ENODEV: Invalid port ID.\n+ */\n+__rte_experimental\n+int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,\n+\t\tstruct rte_power_monitor_cond *pmc);\n+\n /**\n * Retrieve device registers and register attributes (number of registers and\n * register size)\ndiff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h\nindex 0eacfd8425..ae4f152cf0 100644\n--- a/lib/librte_ethdev/rte_ethdev_driver.h\n+++ b/lib/librte_ethdev/rte_ethdev_driver.h\n@@ -763,6 +763,26 @@ typedef int (*eth_hairpin_queue_peer_unbind_t)\n \t(struct rte_eth_dev *dev, uint16_t cur_queue, uint32_t direction);\n /**< @internal Unbind peer queue from the current queue. */\n \n+/**\n+ * @internal\n+ * Get address of memory location whose contents will change whenever there is\n+ * new data to be received on an RX queue.\n+ *\n+ * @param rxq\n+ * Ethdev queue pointer.\n+ * @param pmc\n+ * The pointer to power-optimized monitoring condition structure.\n+ * @return\n+ * Negative errno value on error, 0 on success.\n+ *\n+ * @retval 0\n+ * Success\n+ * @retval -EINVAL\n+ * Invalid parameters\n+ */\n+typedef int (*eth_get_monitor_addr_t)(void *rxq,\n+\t\tstruct rte_power_monitor_cond *pmc);\n+\n /**\n * @internal A structure containing the functions exported by an Ethernet driver.\n */\n@@ -917,6 +937,8 @@ struct eth_dev_ops {\n \t/**< Set up the connection between the pair of hairpin queues. */\n \teth_hairpin_queue_peer_unbind_t hairpin_queue_peer_unbind;\n \t/**< Disconnect the hairpin queues of a pair from each other. */\n+\teth_get_monitor_addr_t get_monitor_addr;\n+\t/**< Get next RX queue ring entry address. */\n };\n \n /**\ndiff --git a/lib/librte_ethdev/version.map b/lib/librte_ethdev/version.map\nindex d3f5410806..a124e1e370 100644\n--- a/lib/librte_ethdev/version.map\n+++ b/lib/librte_ethdev/version.map\n@@ -240,6 +240,9 @@ EXPERIMENTAL {\n \trte_flow_get_restore_info;\n \trte_flow_tunnel_action_decap_release;\n \trte_flow_tunnel_item_release;\n+\n+\t# added in 21.02\n+\trte_eth_get_monitor_addr;\n };\n \n INTERNAL {\n", "prefixes": [ "v12", "06/11" ] }{ "id": 85331, "url": "