Show a patch.

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

{
    "id": 74547,
    "url": "https://patches.dpdk.org/api/patches/74547/",
    "web_url": "https://patches.dpdk.org/patch/74547/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200721095140.719297-9-bruce.richardson@intel.com>",
    "date": "2020-07-21T09:51:28",
    "name": "[20.11,08/20] raw/ioat: add skeleton for vfio/uio based DSA device",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "da59ce9ac6e0b7a46c84cb8282c202ec8906fe1c",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/patch/74547/mbox/",
    "series": [
        {
            "id": 11200,
            "url": "https://patches.dpdk.org/api/series/11200/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11200",
            "date": "2020-07-21T09:51:20",
            "name": "raw/ioat: enhancements and new hardware support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11200/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74547/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/74547/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9688\"; a=\"138191210\"",
            "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"138191210\"",
            "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"488023863\""
        ],
        "IronPort-SDR": [
            "\n Ng9Iur42Dk1i196WtAQYgDl8PYbcWmweidMTYhL6e+Tdpm06BzHsvQgmoPYOeRl2tGUfbiG+St\n 2871tu7SXgCg==",
            "\n mWwOIrN/IsnwIsZP4WewmBzOhhda1BeK/OLWkFI8tWjMdM45KAs5mP0mrOcai1e5+3xHQuDgjH\n Lswv/s47LBAg=="
        ],
        "X-Amp-File-Uploaded": "False",
        "Precedence": "list",
        "X-Mailman-Version": "2.1.15",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "References": "<20200721095140.719297-1-bruce.richardson@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 20.11 08/20] raw/ioat: add skeleton for vfio/uio\n\tbased DSA device",
        "Sender": "\"dev\" <dev-bounces@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 EB57DA0526;\n\tTue, 21 Jul 2020 11:53:19 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EB30B1C002;\n\tTue, 21 Jul 2020 11:53:12 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 07D2F1BFE9\n for <dev@dpdk.org>; Tue, 21 Jul 2020 11:53:08 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2020 02:53:08 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.36])\n by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2020 02:53:07 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 2.25.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Date": "Tue, 21 Jul 2020 10:51:28 +0100",
        "Content-Transfer-Encoding": "8bit",
        "To": "dev@dpdk.org",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "In-Reply-To": "<20200721095140.719297-1-bruce.richardson@intel.com>",
        "Cc": "cheng1.jiang@intel.com, patrick.fu@intel.com, kevin.laatz@intel.com,\n Bruce Richardson <bruce.richardson@intel.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Message-Id": "<20200721095140.719297-9-bruce.richardson@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "Add in the basic probe/remove skeleton code for DSA devices which are bound\ndirectly to vfio or uio driver. The kernel module for supporting these uses\nthe \"idxd\" name, so that name is used as function and file prefix to avoid\nconflict with existing \"ioat\" prefixed functions.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ioat/idxd_pci.c     | 56 +++++++++++++++++++++++++++++++++\n drivers/raw/ioat/ioat_private.h | 27 ++++++++++++++++\n drivers/raw/ioat/ioat_rawdev.c  |  9 +-----\n drivers/raw/ioat/meson.build    |  6 ++--\n 4 files changed, 88 insertions(+), 10 deletions(-)\n create mode 100644 drivers/raw/ioat/idxd_pci.c\n create mode 100644 drivers/raw/ioat/ioat_private.h",
    "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nnew file mode 100644\nindex 000000000..f6af9d33a\n--- /dev/null\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -0,0 +1,56 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Intel Corporation\n+ */\n+\n+#include <rte_bus_pci.h>\n+\n+#include \"ioat_private.h\"\n+\n+#define IDXD_VENDOR_ID\t\t0x8086\n+#define IDXD_DEVICE_ID_SPR\t0x0B25\n+\n+#define IDXD_PMD_RAWDEV_NAME_PCI rawdev_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_rawdev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)\n+{\n+\tint ret = 0;\n+\tchar name[32];\n+\n+\trte_pci_device_name(&dev->addr, name, sizeof(name));\n+\tIOAT_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_rawdev_remove_pci(struct rte_pci_device *dev)\n+{\n+\tchar name[32];\n+\tint ret = 0;\n+\n+\trte_pci_device_name(&dev->addr, name, sizeof(name));\n+\n+\tIOAT_PMD_INFO(\"Closing %s on NUMA node %d\", name, dev->device.numa_node);\n+\n+\treturn ret;\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_rawdev_probe_pci,\n+\t.remove = idxd_rawdev_remove_pci,\n+};\n+\n+RTE_PMD_REGISTER_PCI(IDXD_PMD_RAWDEV_NAME_PCI, idxd_pmd_drv_pci);\n+RTE_PMD_REGISTER_PCI_TABLE(IDXD_PMD_RAWDEV_NAME_PCI, pci_id_idxd_map);\n+RTE_PMD_REGISTER_KMOD_DEP(IDXD_PMD_RAWDEV_NAME_PCI,\n+\t\t\t  \"* igb_uio | uio_pci_generic | vfio-pci\");\n+\ndiff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h\nnew file mode 100644\nindex 000000000..d87d4d055\n--- /dev/null\n+++ b/drivers/raw/ioat/ioat_private.h\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Intel Corporation\n+ */\n+\n+#ifndef _IOAT_PRIVATE_H_\n+#define _IOAT_PRIVATE_H_\n+\n+/**\n+ * @file idxd_private.h\n+ *\n+ * Private data structures for the idxd/DSA part of ioat device driver\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL: these structures and APIs may change without prior notice\n+ */\n+\n+extern int ioat_pmd_logtype;\n+\n+#define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \\\n+\t\tioat_pmd_logtype, \"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n+#define IOAT_PMD_DEBUG(fmt, args...)  IOAT_PMD_LOG(DEBUG, fmt, ## args)\n+#define IOAT_PMD_INFO(fmt, args...)   IOAT_PMD_LOG(INFO, fmt, ## args)\n+#define IOAT_PMD_ERR(fmt, args...)    IOAT_PMD_LOG(ERR, fmt, ## args)\n+#define IOAT_PMD_WARN(fmt, args...)   IOAT_PMD_LOG(WARNING, fmt, ## args)\n+\n+#endif /* _IOAT_PRIVATE_H_ */\ndiff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c\nindex 11c6a57e1..8f9c8b56f 100644\n--- a/drivers/raw/ioat/ioat_rawdev.c\n+++ b/drivers/raw/ioat/ioat_rawdev.c\n@@ -10,6 +10,7 @@\n \n #include \"rte_ioat_rawdev.h\"\n #include \"ioat_spec.h\"\n+#include \"ioat_private.h\"\n \n static struct rte_pci_driver ioat_pmd_drv;\n \n@@ -29,14 +30,6 @@ static struct rte_pci_driver ioat_pmd_drv;\n \n RTE_LOG_REGISTER(ioat_pmd_logtype, rawdev.ioat, INFO);\n \n-#define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \\\n-\tioat_pmd_logtype, \"%s(): \" fmt \"\\n\", __func__, ##args)\n-\n-#define IOAT_PMD_DEBUG(fmt, args...)  IOAT_PMD_LOG(DEBUG, fmt, ## args)\n-#define IOAT_PMD_INFO(fmt, args...)   IOAT_PMD_LOG(INFO, fmt, ## args)\n-#define IOAT_PMD_ERR(fmt, args...)    IOAT_PMD_LOG(ERR, fmt, ## args)\n-#define IOAT_PMD_WARN(fmt, args...)   IOAT_PMD_LOG(WARNING, fmt, ## args)\n-\n #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)\n #define COMPLETION_SZ sizeof(__m128i)\n \ndiff --git a/drivers/raw/ioat/meson.build b/drivers/raw/ioat/meson.build\nindex 06636f8a9..3529635e9 100644\n--- a/drivers/raw/ioat/meson.build\n+++ b/drivers/raw/ioat/meson.build\n@@ -3,8 +3,10 @@\n \n build = dpdk_conf.has('RTE_ARCH_X86')\n reason = 'only supported on x86'\n-sources = files('ioat_rawdev.c',\n-\t\t'ioat_rawdev_test.c')\n+sources = files(\n+\t'idxd_pci.c',\n+\t'ioat_rawdev.c',\n+\t'ioat_rawdev_test.c')\n deps += ['rawdev', 'bus_pci', 'mbuf']\n \n install_headers('rte_ioat_rawdev.h',\n",
    "prefixes": [
        "20.11",
        "08/20"
    ]
}