Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/100742/?format=api
http://patches.dpdk.org/api/patches/100742/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211008034111.14121-2-jie1x.wang@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": "<20211008034111.14121-2-jie1x.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211008034111.14121-2-jie1x.wang@intel.com", "date": "2021-10-08T03:41:10", "name": "[v10,1/2] ethdev: add an API to get device configuration info", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f555b52e46b1047e8aae24a7aa95ab05a483f004", "submitter": { "id": 2201, "url": "http://patches.dpdk.org/api/people/2201/?format=api", "name": "Jie Wang", "email": "jie1x.wang@intel.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211008034111.14121-2-jie1x.wang@intel.com/mbox/", "series": [ { "id": 19443, "url": "http://patches.dpdk.org/api/series/19443/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19443", "date": "2021-10-08T03:41:09", "name": "testpmd shows incorrect rx_offload configuration", "version": 10, "mbox": "http://patches.dpdk.org/series/19443/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/100742/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/100742/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 EE9D0A0C43;\n\tFri, 8 Oct 2021 05:41:24 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2C6C540DF8;\n\tFri, 8 Oct 2021 05:41:24 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 90B1040DDD\n for <dev@dpdk.org>; Fri, 8 Oct 2021 05:41:22 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Oct 2021 20:41:22 -0700", "from unknown (HELO dpdk.cd.intel.com) ([10.240.178.134])\n by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Oct 2021 20:41:19 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10130\"; a=\"213375179\"", "E=Sophos;i=\"5.85,356,1624345200\"; d=\"scan'208\";a=\"213375179\"", "E=Sophos;i=\"5.85,356,1624345200\"; d=\"scan'208\";a=\"624571075\"" ], "From": "Jie Wang <jie1x.wang@intel.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com, thomas@monjalon.net,\n andrew.rybchenko@oktetlabs.ru,\n xiaoyun.li@intel.com, stevex.yang@intel.com,\n Jie Wang <jie1x.wang@intel.com>", "Date": "Fri, 8 Oct 2021 11:41:10 +0800", "Message-Id": "<20211008034111.14121-2-jie1x.wang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211008034111.14121-1-jie1x.wang@intel.com>", "References": "<20210926092055.495322-1-jie1x.wang@intel.com>\n <20211008034111.14121-1-jie1x.wang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v10 1/2] ethdev: add an API to get device\n configuration info", "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": "The driver may change offloads info into dev->data->dev_conf\nin dev_configure which may cause port->dev_conf and port->rx_conf\ncontain outdated values.\n\nThis patch adds a new API \"rte_eth_dev_conf_get()\" to help users\nget device configuration info.\n\nAdd information about the new API in release notes.\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n doc/guides/rel_notes/release_21_11.rst | 5 +++++\n lib/ethdev/rte_ethdev.c | 23 +++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h | 21 +++++++++++++++++++++\n lib/ethdev/version.map | 3 +++\n 4 files changed, 52 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex f099b1cca2..c16cc83fd1 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -129,6 +129,11 @@ New Features\n * Added tests to validate packets hard expiry.\n * Added tests to verify tunnel header verification in IPsec inbound.\n \n+* **Added support for users get device configuration.**\n+\n+ * Added an API which can help users get device configuration.\n+ The declarations for the API's can be found in ``rte_ethdev.h``.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex daf5ca9242..ddbe34e276 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -3457,6 +3457,29 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)\n \treturn 0;\n }\n \n+int\n+rte_eth_dev_conf_get(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_conf *dev_conf_info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (dev_conf_info == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Cannot get ethdev port %u configuration info to NULL\\n\",\n+\t\t\tport_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* copy dev->data->dev_conf to dev_conf_info */\n+\tmemcpy(dev_conf_info, &dev->data->dev_conf,\n+\t\tsizeof(struct rte_eth_conf));\n+\n+\treturn 0;\n+}\n+\n int\n rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,\n \t\t\t\t uint32_t *ptypes, int num)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex afdc53b674..2934b904ea 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3082,6 +3082,27 @@ int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);\n */\n int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Retrieve the configuration of an Ethernet device.\n+ *\n+ * @param port_id\n+ * The port identifier of the Ethernet device.\n+ * @param dev_conf_info\n+ * A pointer to a structure of type *rte_eth_conf* to be filled with\n+ * the configuration of the Ethernet device.\n+ * And the memory of the structure should be allocated by the caller.\n+ * @return\n+ * - (0) if successful.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_dev_conf_get(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_conf *dev_conf_info);\n+\n /**\n * Retrieve the firmware version of a device.\n *\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 904bce6ea1..06f1d8da48 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -247,6 +247,9 @@ EXPERIMENTAL {\n \trte_mtr_meter_policy_delete;\n \trte_mtr_meter_policy_update;\n \trte_mtr_meter_policy_validate;\n+\n+\t# added in 21.11\n+\trte_eth_dev_conf_get;\n };\n \n INTERNAL {\n", "prefixes": [ "v10", "1/2" ] }{ "id": 100742, "url": "