get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134880,
    "url": "https://patches.dpdk.org/api/patches/134880/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/ab06b0b804b4b27ea8444381ea14a98a3c3231bb.1701778603.git.wangyunjian@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": "<ab06b0b804b4b27ea8444381ea14a98a3c3231bb.1701778603.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/ab06b0b804b4b27ea8444381ea14a98a3c3231bb.1701778603.git.wangyunjian@huawei.com",
    "date": "2023-12-05T12:23:51",
    "name": "[v2] net/af_xdp: fix memzone leak in error path",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "99fe47429a68a8994ff2c948fa62427917905669",
    "submitter": {
        "id": 551,
        "url": "https://patches.dpdk.org/api/people/551/?format=api",
        "name": "Yunjian Wang",
        "email": "wangyunjian@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/ab06b0b804b4b27ea8444381ea14a98a3c3231bb.1701778603.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 30458,
            "url": "https://patches.dpdk.org/api/series/30458/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30458",
            "date": "2023-12-05T12:23:51",
            "name": "[v2] net/af_xdp: fix memzone leak in error path",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/30458/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/134880/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/134880/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 A7B3843677;\n\tTue,  5 Dec 2023 13:24:33 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0138742E4B;\n\tTue,  5 Dec 2023 13:24:33 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 77A6A42E2B;\n Tue,  5 Dec 2023 13:24:31 +0100 (CET)",
            "from dggpemm500008.china.huawei.com (unknown [172.30.72.56])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Sl03W3mrGzFr9C;\n Tue,  5 Dec 2023 20:20:07 +0800 (CST)",
            "from localhost (10.174.242.157) by dggpemm500008.china.huawei.com\n (7.185.36.136) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 5 Dec\n 2023 20:24:28 +0800"
        ],
        "From": "Yunjian Wang <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@amd.com>, <ciara.loftus@intel.com>, <qi.z.zhang@intel.com>,\n <xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,\n <stable@dpdk.org>",
        "Subject": "[PATCH v2] net/af_xdp: fix memzone leak in error path",
        "Date": "Tue, 5 Dec 2023 20:23:51 +0800",
        "Message-ID": "\n <ab06b0b804b4b27ea8444381ea14a98a3c3231bb.1701778603.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "In-Reply-To": "\n <64117415a68e8c920efdf905f799b26dcbc3f8fb.1701415014.git.wangyunjian@huawei.com>",
        "References": "\n <64117415a68e8c920efdf905f799b26dcbc3f8fb.1701415014.git.wangyunjian@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.242.157]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n dggpemm500008.china.huawei.com (7.185.36.136)",
        "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": "In xdp_umem_configure() allocated memzone for the 'umem', we should\nfree it when xsk_umem__create() call fails, otherwise it will lead to\nmemory zone leak. To fix it move 'umem->mz = mz;' assignment after\n'mz == NULL' check.\n\nFixes: f1debd77efaf (\"net/af_xdp: introduce AF_XDP PMD\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\nv2: update code suggested by Ferruh Yigit\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex 353c8688ec..9f0f751d4a 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -1235,6 +1235,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,\n \t\tgoto err;\n \t}\n \n+\tumem->mz = mz;\n \tret = xsk_umem__create(&umem->umem, mz->addr,\n \t\t\t       ETH_AF_XDP_NUM_BUFFERS * ETH_AF_XDP_FRAME_SIZE,\n \t\t\t       &rxq->fq, &rxq->cq,\n@@ -1244,7 +1245,6 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,\n \t\tAF_XDP_LOG(ERR, \"Failed to create umem\\n\");\n \t\tgoto err;\n \t}\n-\tumem->mz = mz;\n \n \treturn umem;\n \n",
    "prefixes": [
        "v2"
    ]
}