get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/136207/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 136207,
    "url": "https://patches.dpdk.org/api/patches/136207/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240130013249.987959-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": "<20240130013249.987959-1-huangdengdui@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240130013249.987959-1-huangdengdui@huawei.com",
    "date": "2024-01-30T01:32:49",
    "name": "[v2] app/testpmd: fix crash in multi-process packet forwarding",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20240130013249.987959-1-huangdengdui@huawei.com/mbox/",
    "series": [
        {
            "id": 30933,
            "url": "https://patches.dpdk.org/api/series/30933/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30933",
            "date": "2024-01-30T01:32:49",
            "name": "[v2] app/testpmd: fix crash in multi-process packet forwarding",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/30933/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/136207/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/136207/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 673A243A04;\n\tTue, 30 Jan 2024 02:32:56 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C5E4F40E09;\n\tTue, 30 Jan 2024 02:32:54 +0100 (CET)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id 6FCEF40DCD\n for <dev@dpdk.org>; Tue, 30 Jan 2024 02:32:52 +0100 (CET)",
            "from mail.maildlp.com (unknown [172.19.162.112])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TP71h0ryKz1xmnx;\n Tue, 30 Jan 2024 09:31:52 +0800 (CST)",
            "from dggpeml500011.china.huawei.com (unknown [7.185.36.84])\n by mail.maildlp.com (Postfix) with ESMTPS id 913671404FC;\n Tue, 30 Jan 2024 09:32:50 +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; Tue, 30 Jan 2024 09:32:50 +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 v2] app/testpmd: fix crash in multi-process packet forwarding",
        "Date": "Tue, 30 Jan 2024 09:32:49 +0800",
        "Message-ID": "<20240130013249.987959-1-huangdengdui@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20240126024110.2671570-1-huangdengdui@huawei.com>",
        "References": "<20240126024110.2671570-1-huangdengdui@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.165.33]",
        "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) 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:\n  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00\n  RX 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:\n  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00\n  RX 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>\nAcked-by: Chengwen Feng <fengchengwen@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": [
        "v2"
    ]
}