Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74556/?format=api
https://patches.dpdk.org/api/patches/74556/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200721095140.719297-18-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-18-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200721095140.719297-18-bruce.richardson@intel.com", "date": "2020-07-21T09:51:37", "name": "[20.11,17/20] raw/ioat: create separate statistics structure", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "2ddaa44c318d3e11425683bc787b356ad5326ab0", "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-18-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/74556/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/74556/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 24E27A0526;\n\tTue, 21 Jul 2020 11:57:23 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E0F741C0C3;\n\tTue, 21 Jul 2020 11:56:25 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id B638F1C0B5\n for <dev@dpdk.org>; Tue, 21 Jul 2020 11:56:20 +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:20 -0700", "from silpixa00399126.ir.intel.com ([10.237.222.36])\n by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2020 02:56:18 -0700" ], "IronPort-SDR": [ "\n NAVZh+hGKctJYYHKtyDsHwl2KY4CnFqohfk18Re77S4ucYJ4XW7jokvHlof80NTpWvm4eDy9zj\n rURYHpOVeH7g==", "\n OHBg/NmTvaqtx4NQpHbIScJF4KPtFUMfmpu9P8ovEIEmtEkehnkd/jCfmc9q5S5tBoKHqzc0BN\n HqJnZhjWX76w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9688\"; a=\"138191463\"", "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"138191463\"", "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"488024509\"" ], "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:37 +0100", "Message-Id": "<20200721095140.719297-18-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 17/20] raw/ioat: create separate statistics\n\tstructure", "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": "Rather than having the xstats as fields inside the main driver structure,\ncreate a separate structure type for them.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ioat/ioat_rawdev.c | 21 ++++++++----------\n drivers/raw/ioat/rte_ioat_rawdev_fns.h | 30 ++++++++++++++++----------\n 2 files changed, 28 insertions(+), 23 deletions(-)", "diff": "diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c\nindex 48fe32d0a..e4d39a2ee 100644\n--- a/drivers/raw/ioat/ioat_rawdev.c\n+++ b/drivers/raw/ioat/ioat_rawdev.c\n@@ -135,10 +135,10 @@ ioat_xstats_get(const struct rte_rawdev *dev, const unsigned int ids[],\n \n \tfor (i = 0; i < n; i++) {\n \t\tswitch (ids[i]) {\n-\t\tcase 0: values[i] = ioat->enqueue_failed; break;\n-\t\tcase 1: values[i] = ioat->enqueued; break;\n-\t\tcase 2: values[i] = ioat->started; break;\n-\t\tcase 3: values[i] = ioat->completed; break;\n+\t\tcase 0: values[i] = ioat->xstats.enqueue_failed; break;\n+\t\tcase 1: values[i] = ioat->xstats.enqueued; break;\n+\t\tcase 2: values[i] = ioat->xstats.started; break;\n+\t\tcase 3: values[i] = ioat->xstats.completed; break;\n \t\tdefault: values[i] = 0; break;\n \t\t}\n \t}\n@@ -169,26 +169,23 @@ ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids)\n \tunsigned int i;\n \n \tif (!ids) {\n-\t\tioat->enqueue_failed = 0;\n-\t\tioat->enqueued = 0;\n-\t\tioat->started = 0;\n-\t\tioat->completed = 0;\n+\t\tmemset(&ioat->xstats, 0, sizeof(ioat->xstats));\n \t\treturn 0;\n \t}\n \n \tfor (i = 0; i < nb_ids; i++) {\n \t\tswitch (ids[i]) {\n \t\tcase 0:\n-\t\t\tioat->enqueue_failed = 0;\n+\t\t\tioat->xstats.enqueue_failed = 0;\n \t\t\tbreak;\n \t\tcase 1:\n-\t\t\tioat->enqueued = 0;\n+\t\t\tioat->xstats.enqueued = 0;\n \t\t\tbreak;\n \t\tcase 2:\n-\t\t\tioat->started = 0;\n+\t\t\tioat->xstats.started = 0;\n \t\t\tbreak;\n \t\tcase 3:\n-\t\t\tioat->completed = 0;\n+\t\t\tioat->xstats.completed = 0;\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tIOAT_PMD_WARN(\"Invalid xstat id - cannot reset value\");\ndiff --git a/drivers/raw/ioat/rte_ioat_rawdev_fns.h b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\nindex 98af40894..813c1a157 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n@@ -47,17 +47,31 @@ enum rte_ioat_dev_type {\n \tRTE_IDXD_DEV,\n };\n \n+/**\n+ * @internal\n+ * some statistics for tracking, if added/changed update xstats fns\n+ */\n+struct rte_ioat_xstats {\n+\tuint64_t enqueue_failed;\n+\tuint64_t enqueued;\n+\tuint64_t started;\n+\tuint64_t completed;\n+};\n+\n /**\n * @internal\n * Structure representing an IOAT device instance * Structure representing a device instance\n */\n struct rte_ioat_rawdev {\n+\t/* common fields at the top - match those in rte_idxd_rawdev */\n \tenum rte_ioat_dev_type type;\n+\tstruct rte_ioat_xstats xstats;\n+\n \tstruct rte_rawdev *rawdev;\n \tconst struct rte_memzone *mz;\n \tconst struct rte_memzone *desc_mz;\n \n-\tvolatile uint16_t *doorbell;\n+\tvolatile uint16_t *doorbell __rte_cache_aligned;\n \tphys_addr_t status_addr;\n \tphys_addr_t ring_addr;\n \n@@ -70,12 +84,6 @@ struct rte_ioat_rawdev {\n \tunsigned short next_read;\n \tunsigned short next_write;\n \n-\t/* some statistics for tracking, if added/changed update xstats fns*/\n-\tuint64_t enqueue_failed __rte_cache_aligned;\n-\tuint64_t enqueued;\n-\tuint64_t started;\n-\tuint64_t completed;\n-\n \t/* to report completions, the device will write status back here */\n \tvolatile uint64_t status __rte_cache_aligned;\n \n@@ -207,7 +215,7 @@ __ioat_enqueue_copy(int dev_id, phys_addr_t src, phys_addr_t dst,\n \tstruct rte_ioat_generic_hw_desc *desc;\n \n \tif (space == 0) {\n-\t\tioat->enqueue_failed++;\n+\t\tioat->xstats.enqueue_failed++;\n \t\treturn 0;\n \t}\n \n@@ -226,7 +234,7 @@ __ioat_enqueue_copy(int dev_id, phys_addr_t src, phys_addr_t dst,\n \t\t\t\t\t(int64_t)src_hdl);\n \trte_prefetch0(&ioat->desc_ring[ioat->next_write & mask]);\n \n-\tioat->enqueued++;\n+\tioat->xstats.enqueued++;\n \treturn 1;\n }\n \n@@ -241,7 +249,7 @@ __ioat_perform_ops(int dev_id)\n \t\t\t.control.completion_update = 1;\n \trte_compiler_barrier();\n \t*ioat->doorbell = ioat->next_write;\n-\tioat->started = ioat->enqueued;\n+\tioat->xstats.started = ioat->xstats.enqueued;\n }\n \n /**\n@@ -307,7 +315,7 @@ __ioat_completed_ops(int dev_id, uint8_t max_copies,\n \n end:\n \tioat->next_read = read;\n-\tioat->completed += count;\n+\tioat->xstats.completed += count;\n \treturn count;\n }\n \n", "prefixes": [ "20.11", "17/20" ] }{ "id": 74556, "url": "