Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/99674/?format=api
http://patchwork.dpdk.org/api/patches/99674/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210926092055.495322-2-jie1x.wang@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": "<20210926092055.495322-2-jie1x.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210926092055.495322-2-jie1x.wang@intel.com", "date": "2021-09-26T09:20:53", "name": "[v9,1/3] ethdev: add an API to get device configuration info", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5743e6195b69195168b61dcfb175a7670d5c4e1f", "submitter": { "id": 2201, "url": "http://patchwork.dpdk.org/api/people/2201/?format=api", "name": "Jie Wang", "email": "jie1x.wang@intel.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210926092055.495322-2-jie1x.wang@intel.com/mbox/", "series": [ { "id": 19164, "url": "http://patchwork.dpdk.org/api/series/19164/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19164", "date": "2021-09-26T09:20:52", "name": "testpmd shows incorrect rx_offload configuration", "version": 9, "mbox": "http://patchwork.dpdk.org/series/19164/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/99674/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/99674/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 08379A0547;\n\tSun, 26 Sep 2021 11:21:49 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2EFD940E78;\n\tSun, 26 Sep 2021 11:21:47 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 9759340E6E;\n Sun, 26 Sep 2021 11:21:45 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Sep 2021 02:21:44 -0700", "from dpdk.cd.intel.com ([10.240.178.133])\n by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Sep 2021 02:21:42 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10118\"; a=\"224360702\"", "E=Sophos;i=\"5.85,323,1624345200\"; d=\"scan'208\";a=\"224360702\"", "E=Sophos;i=\"5.85,323,1624345200\"; d=\"scan'208\";a=\"560509644\"" ], "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>, stable@dpdk.org", "Date": "Sun, 26 Sep 2021 17:20:53 +0800", "Message-Id": "<20210926092055.495322-2-jie1x.wang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210926092055.495322-1-jie1x.wang@intel.com>", "References": "<20210827081740.365037-1-jie1x.wang@intel.com>\n <20210926092055.495322-1-jie1x.wang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v9 1/3] 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": "This patch adds a new API \"rte_eth_dev_conf_info_get()\" to help users get\ndevice configuration info.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n lib/ethdev/rte_ethdev.c | 23 +++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h | 21 +++++++++++++++++++++\n lib/ethdev/version.map | 3 +++\n 3 files changed, 47 insertions(+)", "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex daf5ca9242..a0f521323a 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_info_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 1da37896d8..c21ee6a1fe 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3068,6 +3068,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_info_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..4b0a1f0fae 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_info_get;\n };\n \n INTERNAL {\n", "prefixes": [ "v9", "1/3" ] }{ "id": 99674, "url": "