Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74551/?format=api
https://patches.dpdk.org/api/patches/74551/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200721095140.719297-13-bruce.richardson@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": "<20200721095140.719297-13-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200721095140.719297-13-bruce.richardson@intel.com", "date": "2020-07-21T09:51:32", "name": "[20.11,12/20] raw/ioat: add datapath data structures for idxd devices", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "43f0802badc9684f2c29f3f55eb91394dab6bd2d", "submitter": { "id": 20, "url": "https://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@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/20200721095140.719297-13-bruce.richardson@intel.com/mbox/", "series": [ { "id": 11200, "url": "https://patches.dpdk.org/api/series/11200/?format=api", "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/74551/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/74551/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 F339FA0526;\n\tTue, 21 Jul 2020 11:56:26 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A26231C045;\n\tTue, 21 Jul 2020 11:56:12 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 033C31C012\n for <dev@dpdk.org>; Tue, 21 Jul 2020 11:56: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:56:08 -0700", "from silpixa00399126.ir.intel.com ([10.237.222.36])\n by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2020 02:56:06 -0700" ], "IronPort-SDR": [ "\n 7uvBHcYb1sk4Dh2srfjorMi0pEgAn27PuCBVK9gUJ0nMn10llDbJMRrApVqSv1wPeAFbZc1iYd\n EocgH0WcmmHA==", "\n xKpMF5u66dEj90w4nTvPYG39h9OK6TNlQNa/E3n2zl98cmqANXwPtQlTYEgdf+AWOll9Kfezvz\n Ozi9UiDVfaDw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9688\"; a=\"138191441\"", "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"138191441\"", "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"488024433\"" ], "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": "cheng1.jiang@intel.com, patrick.fu@intel.com, kevin.laatz@intel.com,\n Bruce Richardson <bruce.richardson@intel.com>", "Date": "Tue, 21 Jul 2020 10:51:32 +0100", "Message-Id": "<20200721095140.719297-13-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200721095140.719297-1-bruce.richardson@intel.com>", "References": "<20200721095140.719297-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 20.11 12/20] raw/ioat: add datapath data\n\tstructures for 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 in the relevant data structures for the data path for DSA devices. Also\ninclude a device dump function to output the status of each device.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ioat/idxd_pci.c | 3 +-\n drivers/raw/ioat/idxd_vdev.c | 1 +\n drivers/raw/ioat/ioat_common.c | 34 +++++++++++\n drivers/raw/ioat/ioat_private.h | 2 +\n drivers/raw/ioat/ioat_rawdev_test.c | 3 +-\n drivers/raw/ioat/rte_ioat_rawdev_fns.h | 80 ++++++++++++++++++++++++++\n 6 files changed, 121 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nindex 11c07efaa..78c443703 100644\n--- a/drivers/raw/ioat/idxd_pci.c\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -52,7 +52,8 @@ idxd_is_wq_enabled(struct idxd_rawdev *idxd)\n }\n \n static const struct rte_rawdev_ops idxd_pci_ops = {\n-\t\t.dev_selftest = idxd_rawdev_test\n+\t\t.dev_selftest = idxd_rawdev_test,\n+\t\t.dump = idxd_dev_dump,\n };\n \n /* each portal uses 4 x 4k pages */\ndiff --git a/drivers/raw/ioat/idxd_vdev.c b/drivers/raw/ioat/idxd_vdev.c\nindex e81bd7326..2b8122cbc 100644\n--- a/drivers/raw/ioat/idxd_vdev.c\n+++ b/drivers/raw/ioat/idxd_vdev.c\n@@ -34,6 +34,7 @@ struct idxd_vdev_args {\n \n static const struct rte_rawdev_ops idxd_vdev_ops = {\n \t\t.dev_selftest = idxd_rawdev_test,\n+\t\t.dump = idxd_dev_dump,\n };\n \n static void *\ndiff --git a/drivers/raw/ioat/ioat_common.c b/drivers/raw/ioat/ioat_common.c\nindex 4397be886..3dda4ab8e 100644\n--- a/drivers/raw/ioat/ioat_common.c\n+++ b/drivers/raw/ioat/ioat_common.c\n@@ -7,6 +7,36 @@\n \n #include \"ioat_private.h\"\n \n+int\n+idxd_dev_dump(struct rte_rawdev *dev, FILE *f)\n+{\n+\tstruct idxd_rawdev *idxd = dev->dev_private;\n+\tstruct rte_idxd_rawdev *rte_idxd = &idxd->public;\n+\tint i;\n+\n+\tfprintf(f, \"Raw Device #%d\\n\", dev->dev_id);\n+\tfprintf(f, \"Driver: %s\\n\\n\", dev->driver_name);\n+\n+\tfprintf(f, \"Portal: %p\\n\", rte_idxd->portal);\n+\tfprintf(f, \"Batch Ring size: %u\\n\", rte_idxd->batch_ring_sz);\n+\tfprintf(f, \"Comp Handle Ring size: %u\\n\\n\", rte_idxd->hdl_ring_sz);\n+\n+\tfprintf(f, \"Next batch: %u\\n\", rte_idxd->next_batch);\n+\tfprintf(f, \"Next batch to be completed: %u\\n\", rte_idxd->next_completed);\n+\tfor (i = 0; i < rte_idxd->batch_ring_sz; i++) {\n+\t\tstruct rte_idxd_desc_batch *b = &rte_idxd->batch_ring[i];\n+\t\tfprintf(f, \"Batch %u @%p: submitted=%u, op_count=%u, hdl_end=%u\\n\",\n+\t\t\t\ti, b, b->submitted, b->op_count, b->hdl_end);\n+\t}\n+\n+\tfprintf(f, \"\\n\");\n+\tfprintf(f, \"Next free hdl: %u\\n\", rte_idxd->next_free_hdl);\n+\tfprintf(f, \"Last completed hdl: %u\\n\", rte_idxd->last_completed_hdl);\n+\tfprintf(f, \"Next returned hdl: %u\\n\", rte_idxd->next_ret_hdl);\n+\n+\treturn 0;\n+}\n+\n int\n idxd_rawdev_create(const char *name, struct rte_device *dev,\n \t\t const struct idxd_rawdev *base_idxd,\n@@ -18,6 +48,10 @@ idxd_rawdev_create(const char *name, struct rte_device *dev,\n \tchar mz_name[RTE_MEMZONE_NAMESIZE];\n \tint ret = 0;\n \n+\tRTE_BUILD_BUG_ON(sizeof(struct rte_idxd_hw_desc) != 64);\n+\tRTE_BUILD_BUG_ON(offsetof(struct rte_idxd_hw_desc, size ) != 32);\n+\tRTE_BUILD_BUG_ON(sizeof(struct rte_idxd_completion) != 32);\n+\n \tif (!name) {\n \t\tIOAT_PMD_ERR(\"Invalid name of the device!\");\n \t\tret = -EINVAL;\ndiff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h\nindex 2ddaddc37..a873f3f2c 100644\n--- a/drivers/raw/ioat/ioat_private.h\n+++ b/drivers/raw/ioat/ioat_private.h\n@@ -61,4 +61,6 @@ extern int idxd_rawdev_create(const char *name, struct rte_device *dev,\n \n extern int idxd_rawdev_test(uint16_t dev_id);\n \n+extern int idxd_dev_dump(struct rte_rawdev *dev, FILE *f);\n+\n #endif /* _IOAT_PRIVATE_H_ */\ndiff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c\nindex b208b8c19..7864138fb 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -255,7 +255,8 @@ ioat_rawdev_test(uint16_t dev_id)\n }\n \n int\n-idxd_rawdev_test(uint16_t dev_id __rte_unused)\n+idxd_rawdev_test(uint16_t dev_id)\n {\n+\trte_rawdev_dump(dev_id, stdout);\n \treturn 0;\n }\ndiff --git a/drivers/raw/ioat/rte_ioat_rawdev_fns.h b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\nindex aca91dd4f..abd90514b 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n@@ -88,6 +88,86 @@ struct rte_ioat_rawdev {\n #define RTE_IOAT_CHANSTS_HALTED\t\t0x3\n #define RTE_IOAT_CHANSTS_ARMED\t\t\t0x4\n \n+/*\n+ * Defines used in the data path for interacting with hardware.\n+ */\n+#define IDXD_CMD_OP_SHIFT 24\n+enum rte_idxd_ops {\n+\tidxd_op_nop = 0,\n+\tidxd_op_batch,\n+\tidxd_op_drain,\n+\tidxd_op_memmove,\n+\tidxd_op_fill\n+};\n+\n+#define IDXD_FLAG_FENCE (1 << 0)\n+#define IDXD_FLAG_COMPLETION_ADDR_VALID (1 << 2)\n+#define IDXD_FLAG_REQUEST_COMPLETION (1 << 3)\n+#define IDXD_FLAG_CACHE_CONTROL (1 << 8)\n+\n+/**\n+ * Hardware descriptor used by DSA hardware, for both bursts and\n+ * for individual operations.\n+ */\n+struct rte_idxd_hw_desc {\n+\tuint32_t pasid;\n+\tuint32_t op_flags;\n+\trte_iova_t completion;\n+\n+\tRTE_STD_C11\n+\tunion {\n+\t\trte_iova_t src; /* source address for copy ops etc. */\n+\t\trte_iova_t desc_addr; /* descriptor pointer for batch */\n+\t};\n+\trte_iova_t dst;\n+\n+\tuint32_t size; /* length of data for op, or batch size */\n+\n+\t/* 28 bytes of padding here */\n+} __rte_aligned(64);\n+\n+/**\n+ * Completion record structure written back by DSA\n+ */\n+struct rte_idxd_completion {\n+\tuint8_t status;\n+\tuint8_t result;\n+\t/* 16-bits pad here */\n+\tuint32_t completed_size; /* data length, or descriptors for batch */\n+\n+\trte_iova_t fault_address;\n+\tuint32_t invalid_flags;\n+} __rte_aligned(32);\n+\n+#define BATCH_SIZE 64\n+\n+/**\n+ * Structure used inside the driver for building up and submitting\n+ * a batch of operations to the DSA hardware.\n+ */\n+struct rte_idxd_desc_batch {\n+\tstruct rte_idxd_completion comp; /* the completion record for batch */\n+\n+\tuint16_t submitted;\n+\tuint16_t op_count;\n+\tuint16_t hdl_end;\n+\n+\tstruct rte_idxd_hw_desc batch_desc;\n+\n+\t/* batches must always have 2 descriptors, so put a null at the start */\n+\tstruct rte_idxd_hw_desc null_desc;\n+\tstruct rte_idxd_hw_desc ops[BATCH_SIZE];\n+};\n+\n+/**\n+ * structure used to save the \"handles\" provided by the user to be\n+ * returned to the user on job completion.\n+ */\n+struct rte_idxd_user_hdl {\n+\tuint64_t src;\n+\tuint64_t dst;\n+};\n+\n /**\n * @internal\n * Structure representing an IDXD device instance\n", "prefixes": [ "20.11", "12/20" ] }{ "id": 74551, "url": "