Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/86320/?format=api
http://patchwork.dpdk.org/api/patches/86320/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/99a2546b1d4945984d51b1043c924f94e7e0ac8c.1610377085.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": "<99a2546b1d4945984d51b1043c924f94e7e0ac8c.1610377085.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/99a2546b1d4945984d51b1043c924f94e7e0ac8c.1610377085.git.anatoly.burakov@intel.com", "date": "2021-01-11T14:58:51", "name": "[v15,06/11] ethdev: add simple power management API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "43810013bc0713c80bec8a28dbc891b25bbac7f6", "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/99a2546b1d4945984d51b1043c924f94e7e0ac8c.1610377085.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 14637, "url": "http://patchwork.dpdk.org/api/series/14637/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=14637", "date": "2021-01-11T14:58:45", "name": "Add PMD power management", "version": 15, "mbox": "http://patchwork.dpdk.org/series/14637/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/86320/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/86320/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 EA390A09FF;\n\tMon, 11 Jan 2021 15:59:58 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B3A12140EBF;\n\tMon, 11 Jan 2021 15:59:17 +0100 (CET)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 1188C140EB8\n for <dev@dpdk.org>; Mon, 11 Jan 2021 15:59:15 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jan 2021 06:59:15 -0800", "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.222.179])\n by orsmga001.jf.intel.com with ESMTP; 11 Jan 2021 06:59:12 -0800" ], "IronPort-SDR": [ "\n JMWXqCDVNlnnjmJ6Un7kZZo3P7ioKC3UvC77TQbifNF1ZGunuNHPBUGdVtZELCUoVcmx8XpCj/\n efZnlD6vRejA==", "\n XQd+PBQRcq/l9pZ/cGNO135dtsDKI1oJ7r+eMcFqGFGS0DouIqQsX44knaBkTbu+CHB3L+Fejx\n dSiSVy06V/sA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9860\"; a=\"157653024\"", "E=Sophos;i=\"5.79,338,1602572400\"; d=\"scan'208\";a=\"157653024\"", "E=Sophos;i=\"5.79,338,1602572400\"; d=\"scan'208\";a=\"423816594\"" ], "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, timothy.mcdaniel@intel.com,\n david.hunt@intel.com, bruce.richardson@intel.com, chris.macnamara@intel.com", "Date": "Mon, 11 Jan 2021 14:58:51 +0000", "Message-Id": "\n <99a2546b1d4945984d51b1043c924f94e7e0ac8c.1610377085.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<cover.1610377084.git.anatoly.burakov@intel.com>", "References": "<cover.1610375528.git.anatoly.burakov@intel.com>\n <cover.1610377084.git.anatoly.burakov@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v15 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 v13:\n - Fix typos and issues raised by Andrew\n\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 5 files changed, 83 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_21_02.rst b/doc/guides/rel_notes/release_21_02.rst\nindex 638f98168b..6de0cb568e 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": [ "v15", "06/11" ] }{ "id": 86320, "url": "