get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99170,
    "url": "https://patches.dpdk.org/api/patches/99170/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210917140252.2999006-3-kevin.laatz@intel.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": "<20210917140252.2999006-3-kevin.laatz@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210917140252.2999006-3-kevin.laatz@intel.com",
    "date": "2021-09-17T14:02:38",
    "name": "[v4,02/16] dma/idxd: add skeleton for VFIO based DSA device",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "73487190d492ad307964358df3d7a31a228f6aac",
    "submitter": {
        "id": 921,
        "url": "https://patches.dpdk.org/api/people/921/?format=api",
        "name": "Kevin Laatz",
        "email": "kevin.laatz@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210917140252.2999006-3-kevin.laatz@intel.com/mbox/",
    "series": [
        {
            "id": 19018,
            "url": "https://patches.dpdk.org/api/series/19018/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19018",
            "date": "2021-09-17T14:02:36",
            "name": "add dmadev driver for idxd devices",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/19018/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/99170/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/99170/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 48215A0C46;\n\tFri, 17 Sep 2021 16:03:33 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6148C41101;\n\tFri, 17 Sep 2021 16:03:22 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id B2F8F410F7\n for <dev@dpdk.org>; Fri, 17 Sep 2021 16:03:19 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Sep 2021 07:03:18 -0700",
            "from silpixa00401122.ir.intel.com ([10.55.128.10])\n by fmsmga006.fm.intel.com with ESMTP; 17 Sep 2021 07:03:17 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10109\"; a=\"219614834\"",
            "E=Sophos;i=\"5.85,301,1624345200\"; d=\"scan'208\";a=\"219614834\"",
            "E=Sophos;i=\"5.85,301,1624345200\"; d=\"scan'208\";a=\"699496207\""
        ],
        "X-ExtLoop1": "1",
        "From": "Kevin Laatz <kevin.laatz@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, fengchengwen@huawei.com, jerinj@marvell.com,\n conor.walsh@intel.com, Kevin Laatz <kevin.laatz@intel.com>",
        "Date": "Fri, 17 Sep 2021 14:02:38 +0000",
        "Message-Id": "<20210917140252.2999006-3-kevin.laatz@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210917140252.2999006-1-kevin.laatz@intel.com>",
        "References": "<20210827172048.558704-1-kevin.laatz@intel.com>\n <20210917140252.2999006-1-kevin.laatz@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 02/16] dma/idxd: add skeleton for VFIO based\n DSA device",
        "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": "Add the basic device probe/remove skeleton code for DSA device bound to\nthe vfio pci driver. Relevant documentation and MAINTAINERS update also\nincluded.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\n---\n MAINTAINERS                            | 10 +++++\n doc/guides/dmadevs/idxd.rst            | 58 ++++++++++++++++++++++++++\n doc/guides/rel_notes/release_21_11.rst |  5 +++\n drivers/dma/idxd/idxd_internal.h       | 27 ++++++++++++\n drivers/dma/idxd/idxd_pci.c            | 55 ++++++++++++++++++++++++\n drivers/dma/idxd/meson.build           | 11 +++++\n drivers/dma/idxd/version.map           |  3 ++\n drivers/dma/meson.build                |  2 +\n 8 files changed, 171 insertions(+)\n create mode 100644 doc/guides/dmadevs/idxd.rst\n create mode 100644 drivers/dma/idxd/idxd_internal.h\n create mode 100644 drivers/dma/idxd/idxd_pci.c\n create mode 100644 drivers/dma/idxd/meson.build\n create mode 100644 drivers/dma/idxd/version.map",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 3258da194d..9cb59b831d 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1200,6 +1200,16 @@ F: doc/guides/compressdevs/zlib.rst\n F: doc/guides/compressdevs/features/zlib.ini\n \n \n+DMAdev Drivers\n+--------------\n+\n+Intel IDXD - EXPERIMENTAL\n+M: Bruce Richardson <bruce.richardson@intel.com>\n+M: Kevin Laatz <kevin.laatz@intel.com>\n+F: drivers/dma/idxd/\n+F: doc/guides/dmadevs/idxd.rst\n+\n+\n RegEx Drivers\n -------------\n \ndiff --git a/doc/guides/dmadevs/idxd.rst b/doc/guides/dmadevs/idxd.rst\nnew file mode 100644\nindex 0000000000..924700d17e\n--- /dev/null\n+++ b/doc/guides/dmadevs/idxd.rst\n@@ -0,0 +1,58 @@\n+..  SPDX-License-Identifier: BSD-3-Clause\n+    Copyright(c) 2021 Intel Corporation.\n+\n+.. include:: <isonum.txt>\n+\n+IDXD DMA Device Driver\n+======================\n+\n+The ``idxd`` dmadev driver provides a poll-mode driver (PMD) for Intel\\ |reg|\n+Data Streaming Accelerator `(Intel DSA)\n+<https://software.intel.com/content/www/us/en/develop/articles/intel-data-streaming-accelerator-architecture-specification.html>`_.\n+This PMD can be used in conjunction with Intel\\ |reg| DSA devices to offload\n+data operations, such as data copies, to hardware, freeing up CPU cycles for\n+other tasks.\n+\n+Hardware Requirements\n+----------------------\n+\n+The ``dpdk-devbind.py`` script, included with DPDK, can be used to show the\n+presence of supported hardware. Running ``dpdk-devbind.py --status-dev dma``\n+will show all the DMA devices on the system, including IDXD supported devices.\n+Intel\\ |reg| DSA devices, are currently (at time of writing) appearing\n+as devices with type “0b25”, due to the absence of pci-id database entries for\n+them at this point.\n+\n+Compilation\n+------------\n+\n+For builds using ``meson`` and ``ninja``, the driver will be built when the\n+target platform is x86-based. No additional compilation steps are necessary.\n+\n+Device Setup\n+-------------\n+\n+Devices using VFIO/UIO drivers\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+The HW devices to be used will need to be bound to a user-space IO driver for use.\n+The ``dpdk-devbind.py`` script can be used to view the state of the devices\n+and to bind them to a suitable DPDK-supported driver, such as ``vfio-pci``.\n+For example::\n+\n+\t$ dpdk-devbind.py -b vfio-pci 6a:01.0\n+\n+Device Probing and Initialization\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+For devices bound to a suitable DPDK-supported VFIO/UIO driver, the HW devices will\n+be found as part of the device scan done at application initialization time without\n+the need to pass parameters to the application.\n+\n+For Intel\\ |reg| DSA devices, DPDK will automatically configure the device with the\n+maximum number of workqueues available on it, partitioning all resources equally\n+among the queues.\n+If fewer workqueues are required, then the ``max_queues`` parameter may be passed to\n+the device driver on the EAL commandline, via the ``allowlist`` or ``-a`` flag e.g.::\n+\n+\t$ dpdk-test -a <b:d:f>,max_queues=4\ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex a71853b9c3..c0bfd9c1ba 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -92,6 +92,11 @@ New Features\n   * Device allocation and it's multi-process support.\n   * Control and data plane functions.\n \n+* **Added IDXD dmadev driver implementation.**\n+\n+  The IDXD dmadev driver provide device drivers for the Intel DSA devices.\n+  This device driver can be used through the generic dmadev API.\n+\n \n Removed Items\n -------------\ndiff --git a/drivers/dma/idxd/idxd_internal.h b/drivers/dma/idxd/idxd_internal.h\nnew file mode 100644\nindex 0000000000..c6a7dcd72f\n--- /dev/null\n+++ b/drivers/dma/idxd/idxd_internal.h\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2021 Intel Corporation\n+ */\n+\n+#ifndef _IDXD_INTERNAL_H_\n+#define _IDXD_INTERNAL_H_\n+\n+/**\n+ * @file idxd_internal.h\n+ *\n+ * Internal data structures for the idxd/DSA driver for dmadev\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL: these structures and APIs may change without prior notice\n+ */\n+\n+extern int idxd_pmd_logtype;\n+\n+#define IDXD_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \\\n+\t\tidxd_pmd_logtype, \"IDXD: %s(): \" fmt \"\\n\", __func__, ##args)\n+\n+#define IDXD_PMD_DEBUG(fmt, args...)  IDXD_PMD_LOG(DEBUG, fmt, ## args)\n+#define IDXD_PMD_INFO(fmt, args...)   IDXD_PMD_LOG(INFO, fmt, ## args)\n+#define IDXD_PMD_ERR(fmt, args...)    IDXD_PMD_LOG(ERR, fmt, ## args)\n+#define IDXD_PMD_WARN(fmt, args...)   IDXD_PMD_LOG(WARNING, fmt, ## args)\n+\n+#endif /* _IDXD_INTERNAL_H_ */\ndiff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c\nnew file mode 100644\nindex 0000000000..79e4aadcab\n--- /dev/null\n+++ b/drivers/dma/idxd/idxd_pci.c\n@@ -0,0 +1,55 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2021 Intel Corporation\n+ */\n+\n+#include <rte_bus_pci.h>\n+\n+#include \"idxd_internal.h\"\n+\n+#define IDXD_VENDOR_ID\t\t0x8086\n+#define IDXD_DEVICE_ID_SPR\t0x0B25\n+\n+#define IDXD_PMD_DMADEV_NAME_PCI dmadev_idxd_pci\n+\n+const struct rte_pci_id pci_id_idxd_map[] = {\n+\t{ RTE_PCI_DEVICE(IDXD_VENDOR_ID, IDXD_DEVICE_ID_SPR) },\n+\t{ .vendor_id = 0, /* sentinel */ },\n+};\n+\n+static int\n+idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)\n+{\n+\tint ret = 0;\n+\tchar name[PCI_PRI_STR_SIZE];\n+\n+\trte_pci_device_name(&dev->addr, name, sizeof(name));\n+\tIDXD_PMD_INFO(\"Init %s on NUMA node %d\", name, dev->device.numa_node);\n+\tdev->device.driver = &drv->driver;\n+\n+\treturn ret;\n+}\n+\n+static int\n+idxd_dmadev_remove_pci(struct rte_pci_device *dev)\n+{\n+\tchar name[PCI_PRI_STR_SIZE];\n+\n+\trte_pci_device_name(&dev->addr, name, sizeof(name));\n+\n+\tIDXD_PMD_INFO(\"Closing %s on NUMA node %d\",\n+\t\t\tname, dev->device.numa_node);\n+\n+\treturn 0;\n+}\n+\n+struct rte_pci_driver idxd_pmd_drv_pci = {\n+\t.id_table = pci_id_idxd_map,\n+\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING,\n+\t.probe = idxd_dmadev_probe_pci,\n+\t.remove = idxd_dmadev_remove_pci,\n+};\n+\n+RTE_PMD_REGISTER_PCI(IDXD_PMD_DMADEV_NAME_PCI, idxd_pmd_drv_pci);\n+RTE_PMD_REGISTER_PCI_TABLE(IDXD_PMD_DMADEV_NAME_PCI, pci_id_idxd_map);\n+RTE_PMD_REGISTER_KMOD_DEP(IDXD_PMD_DMADEV_NAME_PCI, \"vfio-pci\");\n+RTE_PMD_REGISTER_PARAM_STRING(dmadev_idxd_pci, \"max_queues=0\");\ndiff --git a/drivers/dma/idxd/meson.build b/drivers/dma/idxd/meson.build\nnew file mode 100644\nindex 0000000000..9a64d75005\n--- /dev/null\n+++ b/drivers/dma/idxd/meson.build\n@@ -0,0 +1,11 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2021 Intel Corporation\n+\n+if is_windows\n+    subdir_done()\n+endif\n+\n+deps += ['bus_pci']\n+sources = files(\n+        'idxd_pci.c'\n+)\n\\ No newline at end of file\ndiff --git a/drivers/dma/idxd/version.map b/drivers/dma/idxd/version.map\nnew file mode 100644\nindex 0000000000..4a76d1d52d\n--- /dev/null\n+++ b/drivers/dma/idxd/version.map\n@@ -0,0 +1,3 @@\n+DPDK_21 {\n+\tlocal: *;\n+};\ndiff --git a/drivers/dma/meson.build b/drivers/dma/meson.build\nindex d9c7ede32f..411be7a240 100644\n--- a/drivers/dma/meson.build\n+++ b/drivers/dma/meson.build\n@@ -2,5 +2,7 @@\n # Copyright 2021 HiSilicon Limited\n \n drivers = [\n+        'idxd',\n         'skeleton',\n ]\n+std_deps = ['dmadev']\n",
    "prefixes": [
        "v4",
        "02/16"
    ]
}