get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133471,
    "url": "http://patches.dpdk.org/api/patches/133471/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231027060947.3183983-4-haijie1@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": "<20231027060947.3183983-4-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231027060947.3183983-4-haijie1@huawei.com",
    "date": "2023-10-27T06:09:41",
    "name": "[3/8] net/hns3: fix segmentfault for NEON and SVE",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d438c6e556dd9dbb2f47b85829ba815c4ff39dbf",
    "submitter": {
        "id": 2935,
        "url": "http://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@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/20231027060947.3183983-4-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30018,
            "url": "http://patches.dpdk.org/api/series/30018/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30018",
            "date": "2023-10-27T06:09:41",
            "name": "net/hns3: add some bugfix for hns3",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30018/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133471/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133471/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 AC0E243212;\n\tFri, 27 Oct 2023 08:13:53 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7C94C402D4;\n\tFri, 27 Oct 2023 08:13:53 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 7D8D140272\n for <dev@dpdk.org>; Fri, 27 Oct 2023 08:13:51 +0200 (CEST)",
            "from kwepemi500020.china.huawei.com (unknown [172.30.72.54])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SGsgC4w4dzpWZF\n for <dev@dpdk.org>; Fri, 27 Oct 2023 14:08:55 +0800 (CST)",
            "from localhost.localdomain (10.67.165.2) by\n kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Fri, 27 Oct 2023 14:13:49 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>, Yisen Zhuang <yisen.zhuang@huawei.com>, \"Wei Hu (Xavier)\"\n <xavier.huwei@huawei.com>, Huisong Li <lihuisong@huawei.com>, Chengwen Feng\n <fengchengwen@huawei.com>, Dongdong Liu <liudongdong3@huawei.com>",
        "CC": "<huangdengdui@huawei.com>",
        "Subject": "[PATCH 3/8] net/hns3: fix segmentfault for NEON and SVE",
        "Date": "Fri, 27 Oct 2023 14:09:41 +0800",
        "Message-ID": "<20231027060947.3183983-4-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20231027060947.3183983-1-haijie1@huawei.com>",
        "References": "<20231027060947.3183983-1-haijie1@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.2]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemi500020.china.huawei.com (7.221.188.8)",
        "X-CFilter-Loop": "Reflected",
        "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": "From: Huisong Li <lihuisong@huawei.com>\n\nDriver may fail to allocate bulk mbufs for Neon and SVE when rearm\nmbuf. Currently, driver keeps going to handle packets even if there\nisn't available descriptors to receive packets at this moment.\nAs a result, driver probably fills the mbufs with invalid data to\napplication and accesses to illegal address because of the VLD bit\nof the descriptor at the \"rx_rearm_start\" position still being set.\nSo driver has to clear VLD bit for this descriptor in this scenario\nin case of receiving packets later.\n\nIn addition, it is possible that the sum of the \"rx_rearm_nb\" and\n\"rx_rearm_start\" is greater than total descriptor number of Rx queue\nin the above scenario. So the index of rxq->sw_ring[] to set mbuf\npointer to NULL should also be fixed to avoid out-of-bounds memory\naccess.\n\nFixes: a3d4f4d291d7 (\"net/hns3: support NEON Rx\")\nFixes: f81a18f49152 (\"net/hns3: fix mbuf leakage when RxQ started after reset\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\n---\n drivers/net/hns3/hns3_rxtx.c     | 2 +-\n drivers/net/hns3/hns3_rxtx_vec.h | 5 +++++\n 2 files changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 13214d02d536..f28ca040be41 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -51,7 +51,7 @@ hns3_rx_queue_release_mbufs(struct hns3_rx_queue *rxq)\n \t\t\t}\n \t\t}\n \t\tfor (i = 0; i < rxq->rx_rearm_nb; i++)\n-\t\t\trxq->sw_ring[rxq->rx_rearm_start + i].mbuf = NULL;\n+\t\t\trxq->sw_ring[(rxq->rx_rearm_start + i) % rxq->nb_rx_desc].mbuf = NULL;\n \t}\n \n \tfor (i = 0; i < rxq->bulk_mbuf_num; i++)\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h\nindex a9a6774294ef..9018e79c2f92 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec.h\n+++ b/drivers/net/hns3/hns3_rxtx_vec.h\n@@ -106,6 +106,11 @@ hns3_rxq_rearm_mbuf(struct hns3_rx_queue *rxq)\n \n \tif (unlikely(rte_mempool_get_bulk(rxq->mb_pool, (void *)rxep,\n \t\t\t\t\t  HNS3_DEFAULT_RXQ_REARM_THRESH) < 0)) {\n+\t\t/*\n+\t\t * Clear VLD bit for the first descriptor rearmed in case\n+\t\t * of going to receive packets later.\n+\t\t */\n+\t\trxdp[0].rx.bd_base_info = 0;\n \t\trte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;\n \t\treturn;\n \t}\n",
    "prefixes": [
        "3/8"
    ]
}