Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/99676/?format=api
http://patches.dpdk.org/api/patches/99676/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210926092055.495322-4-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": "<20210926092055.495322-4-jie1x.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210926092055.495322-4-jie1x.wang@intel.com", "date": "2021-09-26T09:20:55", "name": "[v9,3/3] app/testpmd: fix testpmd doesn't show RSS hash offload", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "dfdb3cccf61dc703230154e6e5033026c08fdb4f", "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/20210926092055.495322-4-jie1x.wang@intel.com/mbox/", "series": [ { "id": 19164, "url": "http://patches.dpdk.org/api/series/19164/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19164", "date": "2021-09-26T09:20:52", "name": "testpmd shows incorrect rx_offload configuration", "version": 9, "mbox": "http://patches.dpdk.org/series/19164/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/99676/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/99676/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 E3640A0547;\n\tSun, 26 Sep 2021 11:22:00 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A2F6E40F35;\n\tSun, 26 Sep 2021 11:21:54 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id B88DE4003C;\n Sun, 26 Sep 2021 11:21:52 +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:52 -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:49 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10118\"; a=\"224360710\"", "E=Sophos;i=\"5.85,323,1624345200\"; d=\"scan'208\";a=\"224360710\"", "E=Sophos;i=\"5.85,323,1624345200\"; d=\"scan'208\";a=\"560509668\"" ], "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:55 +0800", "Message-Id": "<20210926092055.495322-4-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 3/3] app/testpmd: fix testpmd doesn't show RSS\n hash offload", "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 updates the offloads info if it changes to fix this issue.\n\nFixes: ce8d561418d4 (\"app/testpmd: add port configuration settings\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n app/test-pmd/cmdline.c | 14 ++++++++++++--\n app/test-pmd/testpmd.c | 34 ++++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h | 2 ++\n app/test-pmd/util.c | 15 +++++++++++++++\n 4 files changed, 63 insertions(+), 2 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex a9efd027c3..3ef8f99358 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -15997,6 +15997,7 @@ cmd_rx_offload_get_configuration_parsed(\n \tstruct rte_eth_dev_info dev_info;\n \tportid_t port_id = res->port_id;\n \tstruct rte_port *port = &ports[port_id];\n+\tstruct rte_eth_conf dev_conf_info;\n \tuint64_t port_offloads;\n \tuint64_t queue_offloads;\n \tuint16_t nb_rx_queues;\n@@ -16005,7 +16006,11 @@ cmd_rx_offload_get_configuration_parsed(\n \n \tprintf(\"Rx Offloading Configuration of port %d :\\n\", port_id);\n \n-\tport_offloads = port->dev_conf.rxmode.offloads;\n+\tret = eth_dev_conf_info_get_print_err(port_id, &dev_conf_info);\n+\tif (ret != 0)\n+\t\treturn;\n+\n+\tport_offloads = dev_conf_info.rxmode.offloads;\n \tprintf(\" Port :\");\n \tprint_rx_offloads(port_offloads);\n \tprintf(\"\\n\");\n@@ -16411,6 +16416,7 @@ cmd_tx_offload_get_configuration_parsed(\n \tstruct rte_eth_dev_info dev_info;\n \tportid_t port_id = res->port_id;\n \tstruct rte_port *port = &ports[port_id];\n+\tstruct rte_eth_conf dev_conf_info;\n \tuint64_t port_offloads;\n \tuint64_t queue_offloads;\n \tuint16_t nb_tx_queues;\n@@ -16419,7 +16425,11 @@ cmd_tx_offload_get_configuration_parsed(\n \n \tprintf(\"Tx Offloading Configuration of port %d :\\n\", port_id);\n \n-\tport_offloads = port->dev_conf.txmode.offloads;\n+\tret = eth_dev_conf_info_get_print_err(port_id, &dev_conf_info);\n+\tif (ret != 0)\n+\t\treturn;\n+\n+\tport_offloads = dev_conf_info.txmode.offloads;\n \tprintf(\" Port :\");\n \tprint_tx_offloads(port_offloads);\n \tprintf(\"\\n\");\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 97ae52e17e..56e6e80739 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -2531,6 +2531,9 @@ start_port(portid_t pid)\n \t\t}\n \n \t\tif (port->need_reconfig > 0) {\n+\t\t\tstruct rte_eth_conf dev_conf_info;\n+\t\t\tint k;\n+\n \t\t\tport->need_reconfig = 0;\n \n \t\t\tif (flow_isolate_all) {\n@@ -2568,6 +2571,37 @@ start_port(portid_t pid)\n \t\t\t\tport->need_reconfig = 1;\n \t\t\t\treturn -1;\n \t\t\t}\n+\t\t\t/* get rte_eth_conf info */\n+\t\t\tif (0 !=\n+\t\t\t\teth_dev_conf_info_get_print_err(pi,\n+\t\t\t\t\t\t\t&dev_conf_info)) {\n+\t\t\t\tfprintf(stderr,\n+\t\t\t\t\t\"port %d can not get device configuration info\\n\",\n+\t\t\t\t\tpi);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\t/* Apply Rx offloads configuration */\n+\t\t\tif (dev_conf_info.rxmode.offloads !=\n+\t\t\t port->dev_conf.rxmode.offloads) {\n+\t\t\t\tport->dev_conf.rxmode.offloads |=\n+\t\t\t\t\tdev_conf_info.rxmode.offloads;\n+\t\t\t\tfor (k = 0;\n+\t\t\t\t k < port->dev_info.max_rx_queues;\n+\t\t\t\t k++)\n+\t\t\t\t\tport->rx_conf[k].offloads |=\n+\t\t\t\t\t\tdev_conf_info.rxmode.offloads;\n+\t\t\t}\n+\t\t\t/* Apply Tx offloads configuration */\n+\t\t\tif (dev_conf_info.txmode.offloads !=\n+\t\t\t port->dev_conf.txmode.offloads) {\n+\t\t\t\tport->dev_conf.txmode.offloads |=\n+\t\t\t\t\tdev_conf_info.txmode.offloads;\n+\t\t\t\tfor (k = 0;\n+\t\t\t\t k < port->dev_info.max_tx_queues;\n+\t\t\t\t k++)\n+\t\t\t\t\tport->tx_conf[k].offloads |=\n+\t\t\t\t\t\tdev_conf_info.txmode.offloads;\n+\t\t\t}\n \t\t}\n \t\tif (port->need_reconfig_queues > 0 && is_proc_primary()) {\n \t\t\tport->need_reconfig_queues = 0;\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 5863b2f43f..48dad40986 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -960,6 +960,8 @@ void show_gro(portid_t port_id);\n void setup_gso(const char *mode, portid_t port_id);\n int eth_dev_info_get_print_err(uint16_t port_id,\n \t\t\tstruct rte_eth_dev_info *dev_info);\n+int eth_dev_conf_info_get_print_err(uint16_t port_id,\n+\t\t\tstruct rte_eth_conf *dev_conf_info);\n void eth_set_promisc_mode(uint16_t port_id, int enable);\n void eth_set_allmulticast_mode(uint16_t port, int enable);\n int eth_link_get_nowait_print_err(uint16_t port_id, struct rte_eth_link *link);\ndiff --git a/app/test-pmd/util.c b/app/test-pmd/util.c\nindex 14a9a251fb..f04786c50f 100644\n--- a/app/test-pmd/util.c\n+++ b/app/test-pmd/util.c\n@@ -444,6 +444,21 @@ eth_dev_info_get_print_err(uint16_t port_id,\n \treturn ret;\n }\n \n+int\n+eth_dev_conf_info_get_print_err(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_conf *dev_conf_info)\n+{\n+\tint ret;\n+\n+\tret = rte_eth_dev_conf_info_get(port_id, dev_conf_info);\n+\tif (ret != 0)\n+\t\tfprintf(stderr,\n+\t\t\t\"Error during getting device configuration (port %u) info: %s\\n\",\n+\t\t\tport_id, strerror(-ret));\n+\n+\treturn ret;\n+}\n+\n void\n eth_set_promisc_mode(uint16_t port, int enable)\n {\n", "prefixes": [ "v9", "3/3" ] }{ "id": 99676, "url": "