Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136170/?format=api
https://patches.dpdk.org/api/patches/136170/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240126024110.2671570-1-huangdengdui@huawei.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": "<20240126024110.2671570-1-huangdengdui@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240126024110.2671570-1-huangdengdui@huawei.com", "date": "2024-01-26T02:41:10", "name": "app/testpmd: fix crash in multi-process packet forwarding", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "6c60b585e97416f8e94121b346e50f4e2449892e", "submitter": { "id": 3066, "url": "https://patches.dpdk.org/api/people/3066/?format=api", "name": "huangdengdui", "email": "huangdengdui@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240126024110.2671570-1-huangdengdui@huawei.com/mbox/", "series": [ { "id": 30919, "url": "https://patches.dpdk.org/api/series/30919/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30919", "date": "2024-01-26T02:41:10", "name": "app/testpmd: fix crash in multi-process packet forwarding", "version": 1, "mbox": "https://patches.dpdk.org/series/30919/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/136170/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/136170/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 0C7BA439CA;\n\tFri, 26 Jan 2024 03:41:15 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8CF64402A7;\n\tFri, 26 Jan 2024 03:41:14 +0100 (CET)", "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 2813240289\n for <dev@dpdk.org>; Fri, 26 Jan 2024 03:41:12 +0100 (CET)", "from mail.maildlp.com (unknown [172.19.88.105])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4TLhk36bXXzXgnZ;\n Fri, 26 Jan 2024 10:39:55 +0800 (CST)", "from dggpeml500011.china.huawei.com (unknown [7.185.36.84])\n by mail.maildlp.com (Postfix) with ESMTPS id B6FC81406AE;\n Fri, 26 Jan 2024 10:41:10 +0800 (CST)", "from localhost.huawei.com (10.50.165.33) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.35; Fri, 26 Jan 2024 10:41:10 +0800" ], "From": "Dengdui Huang <huangdengdui@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@amd.com>, <aman.deep.singh@intel.com>,\n <yuying.zhang@intel.com>, <liuyonglong@huawei.com>", "Subject": "[PATCH] app/testpmd: fix crash in multi-process packet forwarding", "Date": "Fri, 26 Jan 2024 10:41:10 +0800", "Message-ID": "<20240126024110.2671570-1-huangdengdui@huawei.com>", "X-Mailer": "git-send-email 2.33.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.50.165.33]", "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n dggpeml500011.china.huawei.com (7.185.36.84)", "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" }, "content": "On multi-process scenario, each process creates flows based on the\nnumber of queues. When nbcore is greater than 1, multiple cores may\nuse the same queue to forward packet, like:\ndpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4\n--nb-cores=2 --num-procs=2 --proc-id=0\ntestpmd> start\nmac packet forwarding - ports=1 - cores=2 - streams=4 - NUMA support\nenabled, MP allocation mode: native\nLogical Core 2 (socket 0) forwards packets on 2 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\nLogical Core 3 (socket 0) forwards packets on 2 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\n\nAfter this commit, the result will be:\ndpdk-testpmd -a BDF --proc-type=auto -- -i --rxq=4 --txq=4\n--nb-cores=2 --num-procs=2 --proc-id=0\ntestpmd> start\nio packet forwarding - ports=1 - cores=2 - streams=2 - NUMA support\nenabled, MP allocation mode: native\nLogical Core 2 (socket 0) forwards packets on 1 streams:\n RX P=0/Q=0 (socket 2) -> TX P=0/Q=0 (socket 2) peer=02:00:00:00:00:00\nLogical Core 3 (socket 0) forwards packets on 1 streams:\n RX P=0/Q=1 (socket 2) -> TX P=0/Q=1 (socket 2) peer=02:00:00:00:00:00\n\nFixes: a550baf24af9 (\"app/testpmd: support multi-process\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\n---\n app/test-pmd/config.c | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)", "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cad7537bc6..2c4dedd603 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -4794,7 +4794,6 @@ rss_fwd_config_setup(void)\n \tqueueid_t nb_q;\n \tstreamid_t sm_id;\n \tint start;\n-\tint end;\n \n \tnb_q = nb_rxq;\n \tif (nb_q > nb_txq)\n@@ -4802,7 +4801,7 @@ rss_fwd_config_setup(void)\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_q * cur_fwd_config.nb_fwd_ports);\n+\t\t(streamid_t) (nb_q / num_procs * cur_fwd_config.nb_fwd_ports);\n \n \tif (cur_fwd_config.nb_fwd_streams < cur_fwd_config.nb_fwd_lcores)\n \t\tcur_fwd_config.nb_fwd_lcores =\n@@ -4824,7 +4823,6 @@ rss_fwd_config_setup(void)\n \t * the 2~3 queue for secondary process.\n \t */\n \tstart = proc_id * nb_q / num_procs;\n-\tend = start + nb_q / num_procs;\n \trxp = 0;\n \trxq = start;\n \tfor (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {\n@@ -4843,8 +4841,6 @@ rss_fwd_config_setup(void)\n \t\t\tcontinue;\n \t\trxp = 0;\n \t\trxq++;\n-\t\tif (rxq >= end)\n-\t\t\trxq = start;\n \t}\n }\n \n", "prefixes": [] }{ "id": 136170, "url": "