Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80017/?format=api
http://patchwork.dpdk.org/api/patches/80017/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20201008095133.123014-17-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20201008095133.123014-17-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201008095133.123014-17-bruce.richardson@intel.com", "date": "2020-10-08T09:51:24", "name": "[v6,16/25] raw/ioat: add datapath data structures for idxd devices", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d5caab2172083e536aaae47613e2f849d4033211", "submitter": { "id": 20, "url": "http://patchwork.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20201008095133.123014-17-bruce.richardson@intel.com/mbox/", "series": [ { "id": 12773, "url": "http://patchwork.dpdk.org/api/series/12773/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12773", "date": "2020-10-08T09:51:08", "name": "raw/ioat: enhancements and new hardware support", "version": 6, "mbox": "http://patchwork.dpdk.org/series/12773/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/80017/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/80017/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 487B4A04BC;\n\tThu, 8 Oct 2020 11:57:19 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0EAA31BF63;\n\tThu, 8 Oct 2020 11:52:14 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id DC4651BD4B\n for <dev@dpdk.org>; Thu, 8 Oct 2020 11:52:11 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Oct 2020 02:52:11 -0700", "from silpixa00399126.ir.intel.com ([10.237.222.4])\n by orsmga008.jf.intel.com with ESMTP; 08 Oct 2020 02:52:09 -0700" ], "IronPort-SDR": [ "\n BixXvqIcZuhH1jV51zFM4mx354Qt51OlP3GyPPhtnPENBGSo02YiYVYunevhbSuySmKbKPw6kO\n nYg0533zeysA==", "\n u7WKeamHw0SvywMSvhCqN3SM9UvkxLWvcP5ZofLZRNx8tK5mDd1bJVilk1vCBOLYtkD33ehsp9\n Gedeg6hHHWfg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9767\"; a=\"152226389\"", "E=Sophos;i=\"5.77,350,1596524400\"; d=\"scan'208\";a=\"152226389\"", "E=Sophos;i=\"5.77,350,1596524400\"; d=\"scan'208\";a=\"344686721\"" ], "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": "patrick.fu@intel.com, thomas@monjalon.net,\n Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>, Radu Nicolau <radu.nicolau@intel.com>", "Date": "Thu, 8 Oct 2020 10:51:24 +0100", "Message-Id": "<20201008095133.123014-17-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20201008095133.123014-1-bruce.richardson@intel.com>", "References": "<20200721095140.719297-1-bruce.richardson@intel.com>\n <20201008095133.123014-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v6 16/25] raw/ioat: add datapath data structures\n\tfor 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>\nReviewed-by: Kevin Laatz <kevin.laatz@intel.com>\nAcked-by: Radu Nicolau <radu.nicolau@intel.com>\n---\n drivers/raw/ioat/idxd_pci.c | 1 +\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, 120 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nindex c3fec56d5..9bee92766 100644\n--- a/drivers/raw/ioat/idxd_pci.c\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -54,6 +54,7 @@ idxd_is_wq_enabled(struct idxd_rawdev *idxd)\n static const struct rte_rawdev_ops idxd_pci_ops = {\n \t\t.dev_close = idxd_rawdev_close,\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 e61c26c1b..ba78eee90 100644\n--- a/drivers/raw/ioat/idxd_vdev.c\n+++ b/drivers/raw/ioat/idxd_vdev.c\n@@ -33,6 +33,7 @@ struct idxd_vdev_args {\n static const struct rte_rawdev_ops idxd_vdev_ops = {\n \t\t.dev_close = idxd_rawdev_close,\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 c3aa015ed..672241351 100644\n--- a/drivers/raw/ioat/ioat_common.c\n+++ b/drivers/raw/ioat/ioat_common.c\n@@ -14,6 +14,36 @@ idxd_rawdev_close(struct rte_rawdev *dev __rte_unused)\n \treturn 0;\n }\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@@ -25,6 +55,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 6f7bdb499..f521c85a1 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_close(struct rte_rawdev *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 87a65b7ae..ceeac92ef 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -270,7 +270,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 fa2eb5334..178c432dd 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n@@ -90,6 +90,86 @@ struct rte_ioat_rawdev {\n #define RTE_IOAT_CHANSTS_HALTED\t\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": [ "v6", "16/25" ] }{ "id": 80017, "url": "