get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105737,
    "url": "http://patches.dpdk.org/api/patches/105737/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220111134105.1007191-3-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": "<20220111134105.1007191-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220111134105.1007191-3-bruce.richardson@intel.com",
    "date": "2022-01-11T13:41:03",
    "name": "[v2,2/4] dma/idxd: fix paths to driver sysfs directory",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "86c063242b5a5c0b66b9a4ca1e6860e99a8ae0a0",
    "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/20220111134105.1007191-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 21125,
            "url": "http://patches.dpdk.org/api/series/21125/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21125",
            "date": "2022-01-11T13:41:01",
            "name": "fixes for dma/idxd",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/21125/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105737/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/105737/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 5D2A1A034F;\n\tTue, 11 Jan 2022 14:41:55 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 512504270F;\n\tTue, 11 Jan 2022 14:41:55 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id F1B1941143;\n Tue, 11 Jan 2022 14:41:52 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jan 2022 05:41:52 -0800",
            "from silpixa00399126.ir.intel.com ([10.237.223.86])\n by orsmga005.jf.intel.com with ESMTP; 11 Jan 2022 05:41:50 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1641908513; x=1673444513;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=uLS6kz0NEeD9xqA2Bpcqnu94bW5O2uph9CG6Q8zn5b4=;\n b=AUidnZoDrdH9TTh/N4/w05XXJPIBI/6B9t7vgTe+JaWL5qAsQF3hbxFa\n VUF3lK6yXHvmtvyiY9bQHA+tLBsT8CqE3T5iOWwgvM0ANtbKo87k2rrtB\n 7LIOmNGrEHLauusRgZFBGZ/MIS2EIVjjZ4pkpDJeUZH9TXxI13uOkQCrZ\n 0nZEayGo6w9TTz6G16jq72NFfDDlj4S2bHwLarp68LcRZgNYLXt7sIBmQ\n sEMv5SldKhB4lUZ1SvppBtfU+OBC1taBYUmBhEZNYoc8S0IVi0RvtqcI7\n 9q7wncR0UvH2H6D4ESEu0f3FzHhN+k7ih9Ldjfae87zzUEkOyrPlF9G+g Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10223\"; a=\"306836040\"",
            "E=Sophos;i=\"5.88,279,1635231600\"; d=\"scan'208\";a=\"306836040\"",
            "E=Sophos;i=\"5.88,279,1635231600\"; d=\"scan'208\";a=\"690997178\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>, stable@dpdk.org,\n Kevin Laatz <kevin.laatz@intel.com>, Radu Nicolau <radu.nicolau@intel.com>",
        "Subject": "[PATCH v2 2/4] dma/idxd: fix paths to driver sysfs directory",
        "Date": "Tue, 11 Jan 2022 13:41:03 +0000",
        "Message-Id": "<20220111134105.1007191-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220111134105.1007191-1-bruce.richardson@intel.com>",
        "References": "<20211220170514.736732-1-bruce.richardson@intel.com>\n <20220111134105.1007191-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Recent kernel changes[1][2] mean that we cannot guarantee that the paths\nin sysfs used for creating/binding a DSA or workqueue instance will be\nas given in the utility script, since they are now \"compatibility-mode\nonly\". Update script to support both new paths and compatibility ones.\n\n[1] https://lore.kernel.org/all/162637445139.744545.6008938867943724701.stgit@djiang5-desk3.ch.intel.com/\n[2] https://lore.kernel.org/all/162637468705.744545.4399080971745974435.stgit@djiang5-desk3.ch.intel.com/\n\nFixes: 01863b9d2354 (\"raw/ioat: include example configuration script\")\nCc: stable@dpdk.org\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/dma/idxd/dpdk_idxd_cfg.py | 18 ++++++++++++++----\n 1 file changed, 14 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py\nindex fcc27822ef..34537cb980 100755\n--- a/drivers/dma/idxd/dpdk_idxd_cfg.py\n+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py\n@@ -29,9 +29,17 @@ def write_values(self, values):\n                 f.write(str(contents))\n \n \n+def get_drv_dir(dtype):\n+    \"Get the sysfs path for the driver, either 'idxd' or 'user'\"\n+    drv_dir = \"/sys/bus/dsa/drivers/\" + dtype\n+    if not os.path.exists(drv_dir):\n+        return \"/sys/bus/dsa/drivers/dsa\"\n+    return drv_dir\n+\n+\n def reset_device(dsa_id):\n     \"Reset the DSA device and all its queues\"\n-    drv_dir = SysfsDir(\"/sys/bus/dsa/drivers/dsa\")\n+    drv_dir = SysfsDir(get_drv_dir(\"idxd\"))\n     drv_dir.write_values({\"unbind\": f\"dsa{dsa_id}\"})\n \n \n@@ -58,7 +66,6 @@ def get_dsa_id(pci):\n def configure_dsa(dsa_id, queues, prefix):\n     \"Configure the DSA instance with appropriate number of queues\"\n     dsa_dir = SysfsDir(f\"/sys/bus/dsa/devices/dsa{dsa_id}\")\n-    drv_dir = SysfsDir(\"/sys/bus/dsa/drivers/dsa\")\n \n     max_groups = dsa_dir.read_int(\"max_groups\")\n     max_engines = dsa_dir.read_int(\"max_engines\")\n@@ -85,9 +92,12 @@ def configure_dsa(dsa_id, queues, prefix):\n                              \"size\": int(max_work_queues_size / nb_queues)})\n \n     # enable device and then queues\n-    drv_dir.write_values({\"bind\": f\"dsa{dsa_id}\"})\n+    idxd_dir = SysfsDir(get_drv_dir(\"idxd\"))\n+    idxd_dir.write_values({\"bind\": f\"dsa{dsa_id}\"})\n+\n+    user_dir = SysfsDir(get_drv_dir(\"user\"))\n     for q in range(nb_queues):\n-        drv_dir.write_values({\"bind\": f\"wq{dsa_id}.{q}\"})\n+        user_dir.write_values({\"bind\": f\"wq{dsa_id}.{q}\"})\n \n \n def main(args):\n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}