get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80019,
    "url": "http://patches.dpdk.org/api/patches/80019/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201008095133.123014-19-bruce.richardson@intel.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": "<20201008095133.123014-19-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201008095133.123014-19-bruce.richardson@intel.com",
    "date": "2020-10-08T09:51:26",
    "name": "[v6,18/25] raw/ioat: add start and stop functions for idxd devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3371876262737ee8e57b1241d52d677606c7588a",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201008095133.123014-19-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 12773,
            "url": "http://patches.dpdk.org/api/series/12773/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12773",
            "date": "2020-10-08T09:51:08",
            "name": "raw/ioat: enhancements and new hardware support",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/12773/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80019/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80019/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 8A89DA04BC;\n\tThu,  8 Oct 2020 11:57:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 971521BFAA;\n\tThu,  8 Oct 2020 11:52:18 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id DAB981B819\n for <dev@dpdk.org>; Thu,  8 Oct 2020 11:52:15 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Oct 2020 02:52:15 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.4])\n by orsmga008.jf.intel.com with ESMTP; 08 Oct 2020 02:52:13 -0700"
        ],
        "IronPort-SDR": [
            "\n A7/Elj5nmyOZWKTIp9tHYznZWiJPY1FczghxIuq3flY3TS+Zo2nv3190WxSCD55X/YRZHfEb8i\n lZy3OYJIOoTw==",
            "\n q1dvmdENbgTjbb3fsKjnMOCwe1Qm1n3LhZ9pneGhOkhv7UjuPNE2TB6pr/rSkZFdDWOuGBPKdX\n RFxO6otGYQUg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9767\"; a=\"152226398\"",
            "E=Sophos;i=\"5.77,350,1596524400\"; d=\"scan'208\";a=\"152226398\"",
            "E=Sophos;i=\"5.77,350,1596524400\"; d=\"scan'208\";a=\"344686739\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "patrick.fu@intel.com, thomas@monjalon.net,\n Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>, Radu Nicolau <radu.nicolau@intel.com>",
        "Date": "Thu,  8 Oct 2020 10:51:26 +0100",
        "Message-Id": "<20201008095133.123014-19-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20201008095133.123014-1-bruce.richardson@intel.com>",
        "References": "<20200721095140.719297-1-bruce.richardson@intel.com>\n <20201008095133.123014-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 18/25] raw/ioat: add start and stop functions\n\tfor idxd devices",
        "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": "Add the start and stop functions for DSA hardware devices using the\nvfio/uio kernel drivers. For vdevs using the idxd kernel driver, the device\nmust be started using sysfs before the device node appears for vdev use -\nmaking start/stop functions in the driver unnecessary.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Kevin Laatz <kevin.laatz@intel.com>\nAcked-by: Radu Nicolau <radu.nicolau@intel.com>\n---\n drivers/raw/ioat/idxd_pci.c | 50 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 50 insertions(+)",
    "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nindex b173c5ae3..6b5c47392 100644\n--- a/drivers/raw/ioat/idxd_pci.c\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -51,11 +51,61 @@ idxd_is_wq_enabled(struct idxd_rawdev *idxd)\n \treturn ((state >> WQ_STATE_SHIFT) & WQ_STATE_MASK) == 0x1;\n }\n \n+static void\n+idxd_pci_dev_stop(struct rte_rawdev *dev)\n+{\n+\tstruct idxd_rawdev *idxd = dev->dev_private;\n+\tuint8_t err_code;\n+\n+\tif (!idxd_is_wq_enabled(idxd)) {\n+\t\tIOAT_PMD_ERR(\"Work queue %d already disabled\", idxd->qid);\n+\t\treturn;\n+\t}\n+\n+\terr_code = idxd_pci_dev_command(idxd, idxd_disable_wq);\n+\tif (err_code || idxd_is_wq_enabled(idxd)) {\n+\t\tIOAT_PMD_ERR(\"Failed disabling work queue %d, error code: %#x\",\n+\t\t\t\tidxd->qid, err_code);\n+\t\treturn;\n+\t}\n+\tIOAT_PMD_DEBUG(\"Work queue %d disabled OK\", idxd->qid);\n+}\n+\n+static int\n+idxd_pci_dev_start(struct rte_rawdev *dev)\n+{\n+\tstruct idxd_rawdev *idxd = dev->dev_private;\n+\tuint8_t err_code;\n+\n+\tif (idxd_is_wq_enabled(idxd)) {\n+\t\tIOAT_PMD_WARN(\"WQ %d already enabled\", idxd->qid);\n+\t\treturn 0;\n+\t}\n+\n+\tif (idxd->public.batch_ring == NULL) {\n+\t\tIOAT_PMD_ERR(\"WQ %d has not been fully configured\", idxd->qid);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\terr_code = idxd_pci_dev_command(idxd, idxd_enable_wq);\n+\tif (err_code || !idxd_is_wq_enabled(idxd)) {\n+\t\tIOAT_PMD_ERR(\"Failed enabling work queue %d, error code: %#x\",\n+\t\t\t\tidxd->qid, err_code);\n+\t\treturn err_code == 0 ? -1 : err_code;\n+\t}\n+\n+\tIOAT_PMD_DEBUG(\"Work queue %d enabled OK\", idxd->qid);\n+\n+\treturn 0;\n+}\n+\n static const struct rte_rawdev_ops idxd_pci_ops = {\n \t\t.dev_close = idxd_rawdev_close,\n \t\t.dev_selftest = idxd_rawdev_test,\n \t\t.dump = idxd_dev_dump,\n \t\t.dev_configure = idxd_dev_configure,\n+\t\t.dev_start = idxd_pci_dev_start,\n+\t\t.dev_stop = idxd_pci_dev_stop,\n };\n \n /* each portal uses 4 x 4k pages */\n",
    "prefixes": [
        "v6",
        "18/25"
    ]
}