Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/97884/?format=api
https://patches.dpdk.org/api/patches/97884/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210903105001.1179328-4-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": "<20210903105001.1179328-4-kevin.laatz@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210903105001.1179328-4-kevin.laatz@intel.com", "date": "2021-09-03T10:49:48", "name": "[v2,03/16] dma/idxd: add skeleton for VFIO based DSA device", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fc47ed7c89bc3fec01de893113abab73828333c7", "submitter": { "id": 921, "url": "https://patches.dpdk.org/api/people/921/?format=api", "name": "Kevin Laatz", "email": "kevin.laatz@intel.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/20210903105001.1179328-4-kevin.laatz@intel.com/mbox/", "series": [ { "id": 18658, "url": "https://patches.dpdk.org/api/series/18658/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18658", "date": "2021-09-03T10:49:45", "name": "add dmadev driver for idxd devices", "version": 2, "mbox": "https://patches.dpdk.org/series/18658/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/97884/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/97884/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 E4E4BA0C54;\n\tFri, 3 Sep 2021 12:50:30 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 981D8410F6;\n\tFri, 3 Sep 2021 12:50:19 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id ABD50410E0\n for <dev@dpdk.org>; Fri, 3 Sep 2021 12:50:16 +0200 (CEST)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Sep 2021 03:50:16 -0700", "from silpixa00401122.ir.intel.com ([10.55.128.10])\n by fmsmga004.fm.intel.com with ESMTP; 03 Sep 2021 03:50:14 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10095\"; a=\"216247355\"", "E=Sophos;i=\"5.85,265,1624345200\"; d=\"scan'208\";a=\"216247355\"", "E=Sophos;i=\"5.85,265,1624345200\"; d=\"scan'208\";a=\"521643384\"" ], "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, 3 Sep 2021 10:49:48 +0000", "Message-Id": "<20210903105001.1179328-4-kevin.laatz@intel.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210903105001.1179328-1-kevin.laatz@intel.com>", "References": "<20210827172048.558704-1-kevin.laatz@intel.com>\n <20210903105001.1179328-1-kevin.laatz@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 03/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>\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 | 7 ++++\n drivers/dma/idxd/version.map | 3 ++\n drivers/dma/meson.build | 1 +\n 8 files changed, 166 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 c057a090d6..b4c614a229 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1199,6 +1199,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 78b9691bf3..f7b0fcf3fd 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -60,6 +60,11 @@ New Features\n The dmadev library provides a DMA device framework for management and\n provision of hardware and software DMA devices.\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..24c0f3106e\n--- /dev/null\n+++ b/drivers/dma/idxd/meson.build\n@@ -0,0 +1,7 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2021 Intel Corporation\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 0c2c34cd00..0b01b6a8ab 100644\n--- a/drivers/dma/meson.build\n+++ b/drivers/dma/meson.build\n@@ -6,6 +6,7 @@ if is_windows\n endif\n \n drivers = [\n+ 'idxd',\n 'skeleton',\n ]\n std_deps = ['dmadev']\n", "prefixes": [ "v2", "03/16" ] }{ "id": 97884, "url": "