Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/88509/?format=api
http://patches.dpdk.org/api/patches/88509/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1614939741-63927-2-git-send-email-oulijun@huawei.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": "<1614939741-63927-2-git-send-email-oulijun@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1614939741-63927-2-git-send-email-oulijun@huawei.com", "date": "2021-03-05T10:22:19", "name": "[1/3] app/testpmd: fix forwarding configuration when DCB test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a8a99be9a6a74a779f17ba1ff0968a8ed7b940fb", "submitter": { "id": 1675, "url": "http://patches.dpdk.org/api/people/1675/?format=api", "name": "Lijun Ou", "email": "oulijun@huawei.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/1614939741-63927-2-git-send-email-oulijun@huawei.com/mbox/", "series": [ { "id": 15504, "url": "http://patches.dpdk.org/api/series/15504/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15504", "date": "2021-03-05T10:22:18", "name": "Fixes for testpmd", "version": 1, "mbox": "http://patches.dpdk.org/series/15504/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/88509/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/88509/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 C060CA00C2;\n\tFri, 5 Mar 2021 11:21:52 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 82FF722A2E7;\n\tFri, 5 Mar 2021 11:21:42 +0100 (CET)", "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by mails.dpdk.org (Postfix) with ESMTP id 4402C4069B\n for <dev@dpdk.org>; Fri, 5 Mar 2021 11:21:39 +0100 (CET)", "from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DsNyf56f9zjWm7;\n Fri, 5 Mar 2021 18:19:54 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id\n 14.3.498.0; Fri, 5 Mar 2021 18:21:36 +0800" ], "From": "Lijun Ou <oulijun@huawei.com>", "To": "<ferruh.yigit@intel.com>", "CC": "<xiaoyun.li@intel.com>, <dev@dpdk.org>, <linuxarm@openeuler.org>", "Date": "Fri, 5 Mar 2021 18:22:19 +0800", "Message-ID": "<1614939741-63927-2-git-send-email-oulijun@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1614939741-63927-1-git-send-email-oulijun@huawei.com>", "References": "<1614939741-63927-1-git-send-email-oulijun@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH 1/3] app/testpmd: fix forwarding configuration\n when DCB test", "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": "From: Huisong Li <lihuisong@huawei.com>\n\nCurrently, 'nb_fwd_lcores' value are both adjusted based on\n'nb_fwd_streams' in rss/simple/icmp_echo_fwd_config_setup. But the\noperation is lack for dcb_fwd_config_setup, which may lead to a\nbad events where multiple polling threads operate on the same\nqueue. As a result, various possible exceptions will occur. The\nprocedure is as follows:\n\nstartup testpmd app as follows:\ntestpmd> port stop all\ntestpmd> set nbcore 8\ntestpmd> port config 0 dcb vt off 4 pfc on\ntestpmd> port config all rxq 16\ntestpmd> port config all txq 16\ntestpmd> port start all\ntestpmd> set fwd mac\nLogical Core 1 (socket 0) forwards packets on 4 streams:\nRX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=2 (socket 0) -> TX P=0/Q=2 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=3 (socket 0) -> TX P=0/Q=3 (socket 0) peer=02:00:00:00:00:00\nLogical Core 2 (socket 0) forwards packets on 4 streams:\nRX P=0/Q=4 (socket 0) -> TX P=0/Q=4 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=5 (socket 0) -> TX P=0/Q=5 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=6 (socket 0) -> TX P=0/Q=6 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=7 (socket 0) -> TX P=0/Q=7 (socket 0) peer=02:00:00:00:00:00\nLogical Core 3 (socket 0) forwards packets on 4 streams:\nRX P=0/Q=8 (socket 0) -> TX P=0/Q=8 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=9 (socket 0) -> TX P=0/Q=9 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=10 (socket 0) -> TX P=0/Q=10 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=11 (socket 0) -> TX P=0/Q=11 (socket 0) peer=02:00:00:00:00:00\nLogical Core 4 (socket 0) forwards packets on 4 streams:\nRX P=0/Q=12 (socket 0) -> TX P=0/Q=12 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=13 (socket 0) -> TX P=0/Q=13 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=14 (socket 0) -> TX P=0/Q=14 (socket 0) peer=02:00:00:00:00:00\nRX P=0/Q=15 (socket 0) -> TX P=0/Q=15 (socket 0) peer=02:00:00:00:00:00\nLogical Core 5 (socket 0) forwards packets on 1 streams:\nRX P=0/Q=4 (socket 0) -> TX P=0/Q=4 (socket 0) peer=02:00:00:00:00:00\nLogical Core 6 (socket 0) forwards packets on 1 streams:\nRX P=0/Q=5 (socket 0) -> TX P=0/Q=5 (socket 0) peer=02:00:00:00:00:00\nLogical Core 7 (socket 0) forwards packets on 1 streams:\nRX P=0/Q=6 (socket 0) -> TX P=0/Q=6 (socket 0) peer=02:00:00:00:00:00\nLogical Core 8 (socket 0) forwards packets on 1 streams:\nRX P=0/Q=7 (socket 0) -> TX P=0/Q=7 (socket 0) peer=02:00:00:00:00:00\n\nNotice: number of rxq and txq in running cmdline are greater than\nused nb_tc.\n\nFor the DCB forwarding test, each core is assigned on each traffic class\nand each core is assigned a multi-stream. Therefore, 'nb_fwd_lcores'\nvalue can be adjusted based on 'total_tc_num' in all forwarding ports.\n\nIn addition, after operation of port stop/port start, forwarding\nconfiguration is changed by rss_fwd_config_setup. In \"start_port\"\nfunction, dcb_test is set to 1 based on dcb_config. So it also\nshould be cleared when dcb_config is 0.\n\nFixes: 900550de04a7 (\"app/testpmd: add dcb support\")\nFixes: ce8d561418d4 (\"app/testpmd: add port configuration settings\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\n---\n app/test-pmd/config.c | 19 +++++++++++++++++++\n app/test-pmd/testpmd.c | 12 +++++++-----\n 2 files changed, 26 insertions(+), 5 deletions(-)", "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 576d5ac..c89f8cd 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -2864,6 +2864,21 @@ rss_fwd_config_setup(void)\n \t}\n }\n \n+static uint16_t\n+get_fwd_port_total_tc_num(void)\n+{\n+\tstruct rte_eth_dcb_info dcb_info;\n+\tuint16_t total_tc_num = 0;\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < nb_fwd_ports; i++) {\n+\t\t(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[i], &dcb_info);\n+\t\ttotal_tc_num += dcb_info.nb_tcs;\n+\t}\n+\n+\treturn total_tc_num;\n+}\n+\n /**\n * For the DCB forwarding test, each core is assigned on each traffic class.\n *\n@@ -2883,12 +2898,16 @@ dcb_fwd_config_setup(void)\n \tlcoreid_t lc_id;\n \tuint16_t nb_rx_queue, nb_tx_queue;\n \tuint16_t i, j, k, sm_id = 0;\n+\tuint16_t total_tc_num = 0;\n \tuint8_t tc = 0;\n \n \tcur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;\n \tcur_fwd_config.nb_fwd_ports = nb_fwd_ports;\n \tcur_fwd_config.nb_fwd_streams =\n \t\t(streamid_t) (nb_rxq * cur_fwd_config.nb_fwd_ports);\n+\ttotal_tc_num = get_fwd_port_total_tc_num();\n+\tif (cur_fwd_config.nb_fwd_lcores > total_tc_num)\n+\t\tcur_fwd_config.nb_fwd_lcores = total_tc_num;\n \n \t/* reinitialize forwarding streams */\n \tinit_fwd_streams();\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 1a57324..7eb810b 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -2707,14 +2707,16 @@ stop_port(portid_t pid)\n \tportid_t peer_pl[RTE_MAX_ETHPORTS];\n \tint peer_pi;\n \n-\tif (dcb_test) {\n-\t\tdcb_test = 0;\n-\t\tdcb_config = 0;\n-\t}\n-\n \tif (port_id_is_invalid(pid, ENABLED_WARN))\n \t\treturn;\n \n+\t/*\n+\t * In \"start_port\" function, dcb_test is set to 1 based on dcb_config.\n+\t * So it should be cleared when dcb_config is 0.\n+\t */\n+\tif (dcb_config == 0)\n+\t\tdcb_test = 0;\n+\n \tprintf(\"Stopping ports...\\n\");\n \n \tRTE_ETH_FOREACH_DEV(pi) {\n", "prefixes": [ "1/3" ] }{ "id": 88509, "url": "