Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/86630/?format=api
http://patchwork.dpdk.org/api/patches/86630/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/299417d0dc7c063461ed4ebec4d5bc9d0cf5afbd.1610635488.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": "<299417d0dc7c063461ed4ebec4d5bc9d0cf5afbd.1610635488.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/299417d0dc7c063461ed4ebec4d5bc9d0cf5afbd.1610635488.git.anatoly.burakov@intel.com", "date": "2021-01-14T14:46:08", "name": "[v17,06/11] ethdev: add simple power management API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "bfdab157ed4e5cb74f9b603d5da53478d2aeed6c", "submitter": { "id": 4, "url": "http://patchwork.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "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/299417d0dc7c063461ed4ebec4d5bc9d0cf5afbd.1610635488.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 14756, "url": "http://patchwork.dpdk.org/api/series/14756/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=14756", "date": "2021-01-14T14:46:02", "name": "Add PMD power management", "version": 17, "mbox": "http://patchwork.dpdk.org/series/14756/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/86630/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/86630/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 A488CA0A02;\n\tThu, 14 Jan 2021 15:47:20 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5F729141324;\n\tThu, 14 Jan 2021 15:46:35 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 3EC3214131D\n for <dev@dpdk.org>; Thu, 14 Jan 2021 15:46:34 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Jan 2021 06:46:33 -0800", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.179])\n by fmsmga001.fm.intel.com with ESMTP; 14 Jan 2021 06:46:31 -0800" ], "IronPort-SDR": [ "\n 7bvdvYR5fYasNEoRqDFQ7S0TPXVRiGuUd5BbVT7/2cookfZiKb9hxtGl2Isc5YWPz3Ql5ilMNb\n ruoVZ/UgNYjw==", "\n VGlcytSEYntk31Od4AUzPCiExRBlIBteBzS4xwf3DrcZAGno0KjcstrqjN8e/QZ7n4ys8sSv67\n LqGjXKSs1Fqg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9863\"; a=\"174870295\"", "E=Sophos;i=\"5.79,347,1602572400\"; d=\"scan'208\";a=\"174870295\"", "E=Sophos;i=\"5.79,347,1602572400\"; d=\"scan'208\";a=\"465271345\"" ], "X-ExtLoop1": "1", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Liang Ma <liang.j.ma@intel.com>, Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>, Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n konstantin.ananyev@intel.com, timothy.mcdaniel@intel.com,\n david.hunt@intel.com, bruce.richardson@intel.com, chris.macnamara@intel.com", "Date": "Thu, 14 Jan 2021 14:46:08 +0000", "Message-Id": "\n <299417d0dc7c063461ed4ebec4d5bc9d0cf5afbd.1610635488.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<cover.1610635488.git.anatoly.burakov@intel.com>", "References": "<cover.1610473000.git.anatoly.burakov@intel.com>\n <cover.1610635488.git.anatoly.burakov@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v17 06/11] ethdev: add simple power management API", "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: 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: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n\nNotes:\n v17:\n - Added libabigail ignore for driver-only ABI in ethdev as suggested by David\n \n v13:\n - Fix typos and issues raised by Andrew\n\n devtools/libabigail.abignore | 3 +++\n doc/guides/rel_notes/release_21_02.rst | 5 +++++\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 6 files changed, 86 insertions(+)", "diff": "diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore\nindex 025f2c01bc..1c16114dce 100644\n--- a/devtools/libabigail.abignore\n+++ b/devtools/libabigail.abignore\n@@ -7,3 +7,6 @@\n symbol_version = INTERNAL\n [suppress_variable]\n symbol_version = INTERNAL\n+; Explicit ignore for driver-only ABI\n+[suppress_type]\n+ name = eth_dev_ops\ndiff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst\nindex 706cbf8f0c..ec9958a141 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,11 @@ New Features\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n+* **ethdev: added 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 \n Removed Items\n -------------\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 17ddacc78d..e19dbd838b 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_rx_queues) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid Rx 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..3b3b0ec1a0 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 power monitoring condition for Rx queue. */\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": [ "v17", "06/11" ] }{ "id": 86630, "url": "