get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73245,
    "url": "https://patches.dpdk.org/api/patches/73245/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/e4ebc289269ab87d0fa77e9da8f79131e34070ee.1594037787.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": "<e4ebc289269ab87d0fa77e9da8f79131e34070ee.1594037787.git.wangyunjian@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e4ebc289269ab87d0fa77e9da8f79131e34070ee.1594037787.git.wangyunjian@huawei.com",
    "date": "2020-07-06T12:28:02",
    "name": "[3/3] net/af_packet: fix wrong munmap on init failure",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "19b247ac525fd9b39886db6ddaf5ae91e33443cb",
    "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/e4ebc289269ab87d0fa77e9da8f79131e34070ee.1594037787.git.wangyunjian@huawei.com/mbox/",
    "series": [
        {
            "id": 10813,
            "url": "https://patches.dpdk.org/api/series/10813/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10813",
            "date": "2020-07-06T12:26:57",
            "name": "fixes for af_packet driver",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10813/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73245/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/73245/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 62400A00C5;\n\tMon,  6 Jul 2020 14:28:14 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 48EF31D722;\n\tMon,  6 Jul 2020 14:28:14 +0200 (CEST)",
            "from huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by dpdk.org (Postfix) with ESMTP id A43C21D722;\n Mon,  6 Jul 2020 14:28:12 +0200 (CEST)",
            "from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58])\n by Forcepoint Email with ESMTP id 76E3B1144D088B402D08;\n Mon,  6 Jul 2020 20:28:11 +0800 (CST)",
            "from localhost (10.174.185.168) by DGGEMS401-HUB.china.huawei.com\n (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Mon, 6 Jul 2020\n 20:28:03 +0800"
        ],
        "From": "wangyunjian <wangyunjian@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<linville@tuxdriver.com>, <jerry.lilijun@huawei.com>,\n <xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,\n <stable@dpdk.org>",
        "Date": "Mon, 6 Jul 2020 20:28:02 +0800",
        "Message-ID": "\n <e4ebc289269ab87d0fa77e9da8f79131e34070ee.1594037787.git.wangyunjian@huawei.com>",
        "X-Mailer": "git-send-email 1.9.5.msysgit.1",
        "In-Reply-To": "<cover.1594037787.git.wangyunjian@huawei.com>",
        "References": "<cover.1594037787.git.wangyunjian@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.174.185.168]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 3/3] net/af_packet: fix wrong munmap on init\n\tfailure",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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: Yunjian Wang <wangyunjian@huawei.com>\n\nAdd a missing available check and fix the wrong address passed\nto munmap on init failure.\n\nFixes: dd6590fe2fd7 (\"af_packet: fix possible memory leak\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c\nindex be3fabb..4d2e1f6 100644\n--- a/drivers/net/af_packet/rte_eth_af_packet.c\n+++ b/drivers/net/af_packet/rte_eth_af_packet.c\n@@ -843,8 +843,9 @@ struct pmd_internals {\n \tif (qsockfd != -1)\n \t\tclose(qsockfd);\n \tfor (q = 0; q < nb_queues; q++) {\n-\t\tmunmap((*internals)->rx_queue[q].map,\n-\t\t       2 * req->tp_block_size * req->tp_block_nr);\n+\t\tif ((*internals)->rx_queue[q].map != MAP_FAILED)\n+\t\t\tmunmap((*internals)->rx_queue[q].map,\n+\t\t\t       2 * req->tp_block_size * req->tp_block_nr);\n \n \t\trte_free((*internals)->rx_queue[q].rd);\n \t\trte_free((*internals)->tx_queue[q].rd);\n",
    "prefixes": [
        "3/3"
    ]
}