get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 92980,
    "url": "https://patches.dpdk.org/api/patches/92980/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1620272768-42421-3-git-send-email-humin29@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": "<1620272768-42421-3-git-send-email-humin29@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1620272768-42421-3-git-send-email-humin29@huawei.com",
    "date": "2021-05-06T03:46:08",
    "name": "[v2,2/2] examples/ethtool: add closing port operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "828f41d3b2f86e3a932af8344093e25e3568330b",
    "submitter": {
        "id": 1944,
        "url": "https://patches.dpdk.org/api/people/1944/?format=api",
        "name": "humin (Q)",
        "email": "humin29@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1620272768-42421-3-git-send-email-humin29@huawei.com/mbox/",
    "series": [
        {
            "id": 16843,
            "url": "https://patches.dpdk.org/api/series/16843/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16843",
            "date": "2021-05-06T03:46:06",
            "name": "fix bugs for ethtool APP",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/16843/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/92980/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/92980/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 632F8A0524;\n\tThu,  6 May 2021 05:46:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0E981410FC;\n\tThu,  6 May 2021 05:46:18 +0200 (CEST)",
            "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by mails.dpdk.org (Postfix) with ESMTP id F1ACA410EE\n for <dev@dpdk.org>; Thu,  6 May 2021 05:46:13 +0200 (CEST)",
            "from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FbKDm5qyPzkWmQ;\n Thu,  6 May 2021 11:43:36 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id\n 14.3.498.0; Thu, 6 May 2021 11:46:10 +0800"
        ],
        "From": "\"Min Hu (Connor)\" <humin29@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@intel.com>, <thomas@monjalon.net>",
        "Date": "Thu, 6 May 2021 11:46:08 +0800",
        "Message-ID": "<1620272768-42421-3-git-send-email-humin29@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1620272768-42421-1-git-send-email-humin29@huawei.com>",
        "References": "<1617876888-63458-1-git-send-email-humin29@huawei.com>\n <1620272768-42421-1-git-send-email-humin29@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH v2 2/2] examples/ethtool: add closing port\n operation",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Huisong Li <lihuisong@huawei.com>\n\nCurrently, ethtool directly ends the process after 'quit' cmd. In this\ncase, software resources are not released and hardware resources of the\ndevice are not uninstalled.\n\nThis patch adds closing port operation to release resources.\n\nFixes: bda68ab9d1e7 (\"examples/ethtool: add user-space ethtool sample application\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n examples/ethtool/ethtool-app/main.c | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)",
    "diff": "diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c\nindex 21ed85c..9ac0a44 100644\n--- a/examples/ethtool/ethtool-app/main.c\n+++ b/examples/ethtool/ethtool-app/main.c\n@@ -256,6 +256,22 @@ static int worker_main(__rte_unused void *ptr_data)\n \treturn 0;\n }\n \n+static void close_ports(void)\n+{\n+\tuint16_t portid;\n+\tint ret;\n+\n+\tfor (portid = 0; portid < app_cfg.cnt_ports; portid++) {\n+\t\tprintf(\"Closing port %d...\", portid);\n+\t\tret = rte_eth_dev_stop(portid);\n+\t\tif (ret != 0)\n+\t\t\trte_exit(EXIT_FAILURE, \"rte_eth_dev_stop: err=%s, port=%u\\n\",\n+\t\t\t\t strerror(-ret), portid);\n+\t\trte_eth_dev_close(portid);\n+\t\tprintf(\" Done\\n\");\n+\t}\n+}\n+\n int main(int argc, char **argv)\n {\n \tint cnt_args_parsed;\n@@ -299,6 +315,8 @@ int main(int argc, char **argv)\n \t\t\treturn -1;\n \t}\n \n+\tclose_ports();\n+\n \t/* clean up the EAL */\n \trte_eal_cleanup();\n \n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}