get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 107724,
    "url": "https://patches.dpdk.org/api/patches/107724/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220217110924.419024-6-tduszynski@marvell.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": "<20220217110924.419024-6-tduszynski@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220217110924.419024-6-tduszynski@marvell.com",
    "date": "2022-02-17T11:09:18",
    "name": "[v6,05/11] raw/cnxk_gpio: support queue release",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "87b24af9113402b6fc46df9722530216aee85614",
    "submitter": {
        "id": 2215,
        "url": "https://patches.dpdk.org/api/people/2215/?format=api",
        "name": "Tomasz Duszynski",
        "email": "tduszynski@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220217110924.419024-6-tduszynski@marvell.com/mbox/",
    "series": [
        {
            "id": 21706,
            "url": "https://patches.dpdk.org/api/series/21706/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=21706",
            "date": "2022-02-17T11:09:13",
            "name": "Add cnxk_gpio",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/21706/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/107724/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/107724/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 E7CC4A00BE;\n\tThu, 17 Feb 2022 12:10:03 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 601E841171;\n\tThu, 17 Feb 2022 12:09:45 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 2F97841170\n for <dev@dpdk.org>; Thu, 17 Feb 2022 12:09:43 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 21HAdmoh017359;\n Thu, 17 Feb 2022 03:09:42 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3e9mt9r2y3-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 17 Feb 2022 03:09:42 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Thu, 17 Feb 2022 03:09:40 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Thu, 17 Feb 2022 03:09:40 -0800",
            "from localhost.localdomain (unknown [10.28.34.39])\n by maili.marvell.com (Postfix) with ESMTP id 005A23F7050;\n Thu, 17 Feb 2022 03:09:38 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=I6ED1RK8dhQ6wyTBEtmW6DwsekwPa+Zr0oicem6k43M=;\n b=aeOnwjosrEUXOfmvRx/pq98zqSkdJSVuflzMNAl2FCo5tJIHKztCK+Op1mS/lfs9vnti\n frggPf5c30gO3/9TwM8eLjq5jqFzSXUyeTwwPS8qBayRJs3DbKBoZBB07JAfSilngGrQ\n yNPnd0PpdERcBQD9aCih6CMElrN+1YpBPlRd7Z9JaJ4D9URipurqVEaVOp6N0XfnuJe0\n A/KtntYwVRDUXtQk1mveAhps8TsteoBIsobsewgye72jJMPNWBd+SmVTNsLKLUhtjIGV\n ihZa4QL5JfYDwWZdl7PQ8/ehptJPT0+Rg9GtICITumlz0ZYBoYg6NSBPGM2fmdcd5YVC Vg==",
        "From": "Tomasz Duszynski <tduszynski@marvell.com>",
        "To": "<dev@dpdk.org>, Jakub Palider <jpalider@marvell.com>, Tomasz Duszynski\n <tduszynski@marvell.com>",
        "CC": "<jerinj@marvell.com>, <thomas@monjalon.net>",
        "Subject": "[PATCH v6 05/11] raw/cnxk_gpio: support queue release",
        "Date": "Thu, 17 Feb 2022 12:09:18 +0100",
        "Message-ID": "<20220217110924.419024-6-tduszynski@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220217110924.419024-1-tduszynski@marvell.com>",
        "References": "<20220118132424.2573372-1-tduszynski@marvell.com>\n <20220217110924.419024-1-tduszynski@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "aFfOAme1_UsKF9B1zlpd5m94OmJNu12V",
        "X-Proofpoint-ORIG-GUID": "aFfOAme1_UsKF9B1zlpd5m94OmJNu12V",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513\n definitions=2022-02-17_04,2022-02-17_01,2021-12-02_01",
        "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": "Add support for queue release.\n\nSigned-off-by: Tomasz Duszynski <tduszynski@marvell.com>\n---\n drivers/raw/cnxk_gpio/cnxk_gpio.c | 34 +++++++++++++++++++++++++++++++\n 1 file changed, 34 insertions(+)",
    "diff": "diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.c b/drivers/raw/cnxk_gpio/cnxk_gpio.c\nindex 9baa43187e..ec82a55918 100644\n--- a/drivers/raw/cnxk_gpio/cnxk_gpio.c\n+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.c\n@@ -217,6 +217,29 @@ cnxk_gpio_queue_setup(struct rte_rawdev *dev, uint16_t queue_id,\n \treturn 0;\n }\n \n+static int\n+cnxk_gpio_queue_release(struct rte_rawdev *dev, uint16_t queue_id)\n+{\n+\tstruct cnxk_gpiochip *gpiochip = dev->dev_private;\n+\tchar buf[CNXK_GPIO_BUFSZ];\n+\tstruct cnxk_gpio *gpio;\n+\tint ret;\n+\n+\tgpio = cnxk_gpio_lookup(gpiochip, queue_id);\n+\tif (!gpio)\n+\t\treturn -ENODEV;\n+\n+\tsnprintf(buf, sizeof(buf), \"%s/unexport\", CNXK_GPIO_CLASS_PATH);\n+\tret = cnxk_gpio_write_attr_int(buf, gpiochip->base + queue_id);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tgpiochip->gpios[queue_id] = NULL;\n+\trte_free(gpio);\n+\n+\treturn 0;\n+}\n+\n static int\n cnxk_gpio_queue_def_conf(struct rte_rawdev *dev, uint16_t queue_id,\n \t\t\t rte_rawdev_obj_t queue_conf, size_t queue_conf_size)\n@@ -256,6 +279,7 @@ static const struct rte_rawdev_ops cnxk_gpio_rawdev_ops = {\n \t.queue_def_conf = cnxk_gpio_queue_def_conf,\n \t.queue_count = cnxk_gpio_queue_count,\n \t.queue_setup = cnxk_gpio_queue_setup,\n+\t.queue_release = cnxk_gpio_queue_release,\n };\n \n static int\n@@ -329,6 +353,8 @@ cnxk_gpio_remove(struct rte_vdev_device *dev)\n \tchar name[RTE_RAWDEV_NAME_MAX_LEN];\n \tstruct cnxk_gpiochip *gpiochip;\n \tstruct rte_rawdev *rawdev;\n+\tstruct cnxk_gpio *gpio;\n+\tint i;\n \n \tRTE_SET_USED(dev);\n \n@@ -341,6 +367,14 @@ cnxk_gpio_remove(struct rte_vdev_device *dev)\n \t\treturn -ENODEV;\n \n \tgpiochip = rawdev->dev_private;\n+\tfor (i = 0; i < gpiochip->num_gpios; i++) {\n+\t\tgpio = gpiochip->gpios[i];\n+\t\tif (!gpio)\n+\t\t\tcontinue;\n+\n+\t\tcnxk_gpio_queue_release(rawdev, gpio->num);\n+\t}\n+\n \trte_free(gpiochip->gpios);\n \trte_rawdev_pmd_release(rawdev);\n \n",
    "prefixes": [
        "v6",
        "05/11"
    ]
}