Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73488/?format=api
https://patches.dpdk.org/api/patches/73488/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200708011841.22295-4-chenxux.di@intel.com/", "project": { "id": 1, "url": "https://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": "<20200708011841.22295-4-chenxux.di@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200708011841.22295-4-chenxux.di@intel.com", "date": "2020-07-08T01:18:39", "name": "[v4,3/5] app/testpmd: re-implement commands by using private API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1fdd7bc57ac9361364b3ea496c0c3f08becd5e97", "submitter": { "id": 1409, "url": "https://patches.dpdk.org/api/people/1409/?format=api", "name": "Chenxu Di", "email": "chenxux.di@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200708011841.22295-4-chenxux.di@intel.com/mbox/", "series": [ { "id": 10869, "url": "https://patches.dpdk.org/api/series/10869/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10869", "date": "2020-07-08T01:18:36", "name": "re-implement legacy filter functions by private API", "version": 4, "mbox": "https://patches.dpdk.org/series/10869/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/73488/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/73488/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 6DFA6A00BE;\n\tWed, 8 Jul 2020 03:37:40 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA7261DCFD;\n\tWed, 8 Jul 2020 03:37:21 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 3A83F1DC50\n for <dev@dpdk.org>; Wed, 8 Jul 2020 03:37:19 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jul 2020 18:37:18 -0700", "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 07 Jul 2020 18:37:17 -0700" ], "IronPort-SDR": [ "\n fuJpem6s38aqUc70mZItmIE9p7wWQj9maET3bWHYUURQkNAXKyk9j0N171mxqR8GGIwQ32xsKZ\n +JCAu2D+413A==", "\n EBFmkgS6cpEEFiYX8NaQ7LW0udeQ+FBh/+VqrAi8uEjbg80qOirkovEDHbe5LoYntZGJBhze8R\n +yiTmMfBcdTA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9675\"; a=\"149235875\"", "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"149235875\"", "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"297570812\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Chenxu Di <chenxux.di@intel.com>", "To": "dev@dpdk.org", "Cc": "Yang Qiming <qiming.yang@intel.com>,\n\tChenxu Di <chenxux.di@intel.com>", "Date": "Wed, 8 Jul 2020 01:18:39 +0000", "Message-Id": "<20200708011841.22295-4-chenxux.di@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200708011841.22295-1-chenxux.di@intel.com>", "References": "<20200611060142.75465-1-chenxux.di@intel.com>\n <20200708011841.22295-1-chenxux.di@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 3/5] app/testpmd: re-implement commands by\n\tusing private 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": "The legacy filter API will be superseded. This patch use\nprivate api to change the implementation of commands\nglobal_config <port_id> gre-key-len <key_len> and\nshow port fdir <port_id>\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\n---\n app/test-pmd/cmdline.c | 4 +++\n app/test-pmd/config.c | 57 ++++++++++++++++++++++++++++++++++--------\n 2 files changed, 50 insertions(+), 11 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 81c87c8c3..39ad93838 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -9291,6 +9291,10 @@ cmd_global_config_parsed(void *parsed_result,\n \tconf.cfg.gre_key_len = res->len;\n \tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_NONE,\n \t\t\t\t RTE_ETH_FILTER_SET, &conf);\n+#ifdef RTE_LIBRTE_I40E_PMD\n+\tif (ret == -ENOTSUP)\n+\t\tret = rte_pmd_i40e_set_gre_key_len(res->port_id, res->len);\n+#endif\n \tif (ret != 0)\n \t\tprintf(\"Global config error\\n\");\n }\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 75013100f..cf14b584f 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -3746,30 +3746,65 @@ print_fdir_flow_type(uint32_t flow_types_mask)\n \tprintf(\"\\n\");\n }\n \n+static int\n+get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info,\n+\t\t struct rte_eth_fdir_stats *fdir_stat)\n+{\n+\tint ret;\n+\n+\tret = rte_eth_dev_filter_supported(port_id, RTE_ETH_FILTER_FDIR);\n+\tif (!ret) {\n+\t\trte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\t RTE_ETH_FILTER_INFO, fdir_info);\n+\t\trte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\t RTE_ETH_FILTER_STATS, fdir_stat);\n+\t\treturn 0;\n+\t}\n+\n+#ifdef RTE_LIBRTE_I40E_PMD\n+\tif (ret == -ENOTSUP) {\n+\t\tret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info);\n+\t\tif (!ret)\n+\t\t\tret = rte_pmd_i40e_get_fdir_stats(port_id, fdir_stat);\n+\t}\n+#endif\n+#ifdef RTE_LIBRTE_IXGBE_PMD\n+\tif (ret == -ENOTSUP) {\n+\t\tret = rte_pmd_ixgbe_get_fdir_info(port_id, fdir_info);\n+\t\tif (!ret)\n+\t\t\tret = rte_pmd_ixgbe_get_fdir_stats(port_id, fdir_stat);\n+\t}\n+#endif\n+\tswitch (ret) {\n+\tcase 0:\n+\t\tbreak;\n+\tcase -ENOTSUP:\n+\t\tprintf(\"\\n FDIR is not supported on port %-2d\\n\",\n+\t\t\tport_id);\n+\t\tbreak;\n+\tdefault:\n+\t\tprintf(\"programming error: (%s)\\n\", strerror(-ret));\n+\t\tbreak;\n+\t}\n+\treturn ret;\n+}\n+\n void\n fdir_get_infos(portid_t port_id)\n {\n \tstruct rte_eth_fdir_stats fdir_stat;\n \tstruct rte_eth_fdir_info fdir_info;\n-\tint ret;\n \n \tstatic const char *fdir_stats_border = \"########################\";\n \n \tif (port_id_is_invalid(port_id, ENABLED_WARN))\n \t\treturn;\n-\tret = rte_eth_dev_filter_supported(port_id, RTE_ETH_FILTER_FDIR);\n-\tif (ret < 0) {\n-\t\tprintf(\"\\n FDIR is not supported on port %-2d\\n\",\n-\t\t\tport_id);\n-\t\treturn;\n-\t}\n \n \tmemset(&fdir_info, 0, sizeof(fdir_info));\n-\trte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR,\n-\t\t\t RTE_ETH_FILTER_INFO, &fdir_info);\n \tmemset(&fdir_stat, 0, sizeof(fdir_stat));\n-\trte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR,\n-\t\t\t RTE_ETH_FILTER_STATS, &fdir_stat);\n+\tif (get_fdir_info(port_id, &fdir_info, &fdir_stat))\n+\t\treturn;\n+\n \tprintf(\"\\n %s FDIR infos for port %-2d %s\\n\",\n \t fdir_stats_border, port_id, fdir_stats_border);\n \tprintf(\" MODE: \");\n", "prefixes": [ "v4", "3/5" ] }{ "id": 73488, "url": "