Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80891/?format=api
http://patchwork.dpdk.org/api/patches/80891/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/f9575ba1dcb803dd9cab3d45093b8c845fded296.1602763439.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": "<f9575ba1dcb803dd9cab3d45093b8c845fded296.1602763439.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/f9575ba1dcb803dd9cab3d45093b8c845fded296.1602763439.git.anatoly.burakov@intel.com", "date": "2020-10-15T12:04:09", "name": "[v7,04/10] ethdev: add simple power management API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ad6991203863dcc58b37036a4bd0b78fac03a1c5", "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/f9575ba1dcb803dd9cab3d45093b8c845fded296.1602763439.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 13006, "url": "http://patchwork.dpdk.org/api/series/13006/?format=api", "web_url": "http://patchwork.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://patchwork.dpdk.org/series/13006/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/80891/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/80891/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 B71A7A04DB;\n\tThu, 15 Oct 2020 14:05:36 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 368A81E567;\n\tThu, 15 Oct 2020 14:04:44 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id C697A1E551\n for <dev@dpdk.org>; Thu, 15 Oct 2020 14:04:36 +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:34 -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:30 -0700" ], "IronPort-SDR": [ "\n aNhCXdhl3Ja7q2oCqdDdyOiVZGLmGJH9Cz1qbas4W2R736sXDTOvbH2yFO8x1Ku+DY+Lt6IzK9\n QMG7XkhMvLtw==", "\n bVEK1/WsU80gNw0PxKvdNCNAv5r6/tHZttwB+cbS46VdVDIe8ibb0RtaeatDt7seSrEtv96Gde\n ixM8kM12v+RA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9774\"; a=\"227977179\"", "E=Sophos;i=\"5.77,378,1596524400\"; d=\"scan'208\";a=\"227977179\"", "E=Sophos;i=\"5.77,378,1596524400\"; d=\"scan'208\";a=\"314485600\"" ], "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>, 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 david.hunt@intel.com, konstantin.ananyev@intel.com, jerinjacobk@gmail.com,\n bruce.richardson@intel.com, timothy.mcdaniel@intel.com,\n gage.eads@intel.com, chris.macnamara@intel.com", "Date": "Thu, 15 Oct 2020 13:04:09 +0100", "Message-Id": "\n <f9575ba1dcb803dd9cab3d45093b8c845fded296.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 04/10] 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 address of next RX descriptor from the\nPMD, as well as release 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 v7:\n - Fixed queue ID validation\n - Fixed documentation\n \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_20_11.rst | 8 ++++++-\n lib/librte_ethdev/rte_ethdev.c | 23 +++++++++++++++++++\n lib/librte_ethdev/rte_ethdev.h | 28 ++++++++++++++++++++++++\n lib/librte_ethdev/rte_ethdev_driver.h | 28 ++++++++++++++++++++++++\n lib/librte_ethdev/rte_ethdev_version.map | 1 +\n 5 files changed, 87 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex c61d7fcf67..4c6a615ce9 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -71,7 +71,13 @@ New Features\n * **Added the FEC API, for a generic FEC query and config.**\n \n Added the FEC API which provides functions for query FEC capabilities and\n- current FEC mode from device. Also, API for configuring FEC mode is also provided.\n+ current FEC mode from device. Also, API for configuring FEC mode is also\n+ provided.\n+\n+* **ethdev: add 1 new EXPERIMENTAL API for PMD power management.**\n+\n+ * ``rte_eth_get_wake_addr()``\n+ * add new eth_dev_ops ``get_wake_addr``\n \n * **Updated Broadcom bnxt driver.**\n \ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 59beb8aec2..d972a3a656 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -4844,6 +4844,29 @@ 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_wake_addr(uint16_t port_id, uint16_t queue_id,\n+\t\tvolatile void **wake_addr, uint64_t *expected, uint64_t *mask,\n+\t\tuint8_t *data_sz)\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_wake_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+\treturn eth_err(port_id,\n+\t\tdev->dev_ops->get_wake_addr(dev->data->rx_queues[queue_id],\n+\t\t\twake_addr, expected, mask, data_sz));\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 3a31f94367..008bc3cce0 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -4119,6 +4119,34 @@ __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+ * Retrieve the wake up address for the 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 will be\n+ * retrieved.\n+ * @param wake_addr\n+ * The pointer to the address which will be monitored.\n+ * @param expected\n+ * The pointer to value to be expected when descriptor is set.\n+ * @param mask\n+ * The pointer to comparison bitmask for the expected value.\n+ * @param data_sz\n+ * The pointer to data size for the expected value and comparison bitmask.\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_wake_addr(uint16_t port_id, uint16_t queue_id,\n+\t\tvolatile void **wake_addr, uint64_t *expected, uint64_t *mask,\n+\t\tuint8_t *data_sz);\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 35cc4fb186..76b179de42 100644\n--- a/lib/librte_ethdev/rte_ethdev_driver.h\n+++ b/lib/librte_ethdev/rte_ethdev_driver.h\n@@ -655,6 +655,32 @@ typedef int (*eth_fec_get_t)(struct rte_eth_dev *dev,\n */\n typedef int (*eth_fec_set_t)(struct rte_eth_dev *dev, uint32_t fec_capa);\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 tail_desc_addr\n+ * The pointer point to where the address will be stored.\n+ * @param expected\n+ * The pointer point to value to be expected when descriptor is set.\n+ * @param mask\n+ * The pointer point to comparison bitmask for the expected value.\n+ * @param data_sz\n+ * Data size for the expected value (can be 1, 2, 4, or 8 bytes)\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_wake_addr_t)(void *rxq, volatile void **tail_desc_addr,\n+\t\tuint64_t *expected, uint64_t *mask, uint8_t *data_sz);\n+\n /**\n * @internal A structure containing the functions exported by an Ethernet driver.\n */\n@@ -801,6 +827,8 @@ struct eth_dev_ops {\n \t/**< Get Forward Error Correction(FEC) mode. */\n \teth_fec_set_t fec_set;\n \t/**< Set Forward Error Correction(FEC) mode. */\n+\teth_get_wake_addr_t get_wake_addr;\n+\t/**< Get next RX queue ring entry address. */\n };\n \n /**\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex f8a0945812..6c2ea5996d 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -232,6 +232,7 @@ EXPERIMENTAL {\n \trte_eth_fec_get_capability;\n \trte_eth_fec_get;\n \trte_eth_fec_set;\n+\trte_eth_get_wake_addr;\n };\n \n INTERNAL {\n", "prefixes": [ "v7", "04/10" ] }{ "id": 80891, "url": "