Show a patch.

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

{
    "id": 74558,
    "url": "https://patches.dpdk.org/api/patches/74558/",
    "web_url": "https://patches.dpdk.org/patch/74558/",
    "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-20-bruce.richardson@intel.com>",
    "date": "2020-07-21T09:51:39",
    "name": "[20.11,19/20] raw/ioat: add xstats tracking for idxd devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "7da0c9ead3fa4c3c8f29d6484eba035629d08bfd",
    "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/74558/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/74558/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/74558/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=\"138191472\"",
            "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"138191472\"",
            "E=Sophos;i=\"5.75,378,1589266800\"; d=\"scan'208\";a=\"488024538\""
        ],
        "IronPort-SDR": [
            "\n n6wwIJEVlj70dc9kmCRAa8Gdo44FlL2rwb/qFu06H8d/bI6MxxcA3qHDAT+htA+2PKYqmo0ds+\n nBGA0uiewQlg==",
            "\n Wu3j7PQl53vY4teH44yyUy4tUeswbyX0MbgrYtEzhhxu6yEXWuWKUv5CYXZapEhKMmzlhIN76g\n s9BMNHPkleEA=="
        ],
        "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 19/20] raw/ioat: add xstats tracking for\n\tidxd devices",
        "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 0C33FA0526;\n\tTue, 21 Jul 2020 11:57:45 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0FB3F1C0CC;\n\tTue, 21 Jul 2020 11:56:30 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id A28961C0B0\n for <dev@dpdk.org>; Tue, 21 Jul 2020 11:56:25 +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:25 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.36])\n by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2020 02:56:23 -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:39 +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-20-bruce.richardson@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "Add update of the relevant stats for the data path functions and point the\noverall device struct xstats function pointers to the existing ioat\nfunctions.\n\nAt this point, all necessary hooks for supporting the existing unit tests\nare in place so call them for 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           |  3 +++\n drivers/raw/ioat/ioat_rawdev_test.c    |  2 +-\n drivers/raw/ioat/rte_ioat_rawdev_fns.h | 26 ++++++++++++++++----------\n 4 files changed, 23 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nindex 2b5a0e1c8..a426897b2 100644\n--- a/drivers/raw/ioat/idxd_pci.c\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -108,6 +108,9 @@ static const struct rte_rawdev_ops idxd_pci_ops = {\n \t\t.dev_start = idxd_pci_dev_start,\n \t\t.dev_stop = idxd_pci_dev_stop,\n \t\t.dev_info_get = idxd_dev_info_get,\n+\t\t.xstats_get = ioat_xstats_get,\n+\t\t.xstats_get_names = ioat_xstats_get_names,\n+\t\t.xstats_reset = ioat_xstats_reset,\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 8b7c2cacd..aa2693368 100644\n--- a/drivers/raw/ioat/idxd_vdev.c\n+++ b/drivers/raw/ioat/idxd_vdev.c\n@@ -87,6 +87,9 @@ static const struct rte_rawdev_ops idxd_vdev_ops = {\n \t\t.dev_start = idxd_vdev_start,\n \t\t.dev_stop = idxd_vdev_stop,\n \t\t.dev_info_get = idxd_dev_info_get,\n+\t\t.xstats_get = ioat_xstats_get,\n+\t\t.xstats_get_names = ioat_xstats_get_names,\n+\t\t.xstats_reset = ioat_xstats_reset,\n };\n \n static void *\ndiff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c\nindex 7864138fb..678d135c4 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -258,5 +258,5 @@ int\n idxd_rawdev_test(uint16_t dev_id)\n {\n \trte_rawdev_dump(dev_id, stdout);\n-\treturn 0;\n+\treturn ioat_rawdev_test(dev_id);\n }\ndiff --git a/drivers/raw/ioat/rte_ioat_rawdev_fns.h b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\nindex 813c1a157..2ddd0a024 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev_fns.h\n@@ -182,6 +182,8 @@ struct rte_idxd_user_hdl {\n  */\n struct rte_idxd_rawdev {\n \tenum rte_ioat_dev_type type;\n+\tstruct rte_ioat_xstats xstats;\n+\n \tvoid *portal; /* address to write the batch descriptor */\n \n \t/* counters to track the batches and the individual op handles */\n@@ -330,20 +332,16 @@ __idxd_enqueue_copy(int dev_id, rte_iova_t src, rte_iova_t dst,\n \t\t\tIDXD_FLAG_CACHE_CONTROL;\n \n \t/* check for room in the handle ring */\n-\tif (((idxd->next_free_hdl + 1) & (idxd->hdl_ring_sz - 1)) == idxd->next_ret_hdl) {\n-\t\trte_errno = ENOSPC;\n-\t\treturn 0;\n-\t}\n+\tif (((idxd->next_free_hdl + 1) & (idxd->hdl_ring_sz - 1)) == idxd->next_ret_hdl)\n+\t\tgoto failed;\n+\n \tif (b->op_count >= BATCH_SIZE) {\n \t\t/* TODO change to submit batch and move on */\n-\t\trte_errno = ENOSPC;\n-\t\treturn 0;\n+\t\tgoto failed;\n \t}\n \t/* check that we can actually use the current batch */\n-\tif (b->submitted) {\n-\t\trte_errno = ENOSPC;\n-\t\treturn 0;\n-\t}\n+\tif (b->submitted)\n+\t\tgoto failed;\n \n \t/* write the descriptor */\n \tb->ops[b->op_count++] = (struct rte_idxd_hw_desc){\n@@ -362,7 +360,13 @@ __idxd_enqueue_copy(int dev_id, rte_iova_t src, rte_iova_t dst,\n \tif (++idxd->next_free_hdl == idxd->hdl_ring_sz)\n \t\tidxd->next_free_hdl = 0;\n \n+\tidxd->xstats.enqueued++;\n \treturn 1;\n+\n+failed:\n+\tidxd->xstats.enqueue_failed++;\n+\trte_errno = ENOSPC;\n+\treturn 0;\n }\n \n static __rte_always_inline void\n@@ -389,6 +393,7 @@ __idxd_perform_ops(int dev_id)\n \n \tif (++idxd->next_batch == idxd->batch_ring_sz)\n \t\tidxd->next_batch = 0;\n+\tidxd->xstats.started = idxd->xstats.enqueued;\n }\n \n static __rte_always_inline int\n@@ -425,6 +430,7 @@ __idxd_completed_ops(int dev_id, uint8_t max_ops,\n \n \tidxd->next_ret_hdl = h_idx;\n \n+\tidxd->xstats.completed += n;\n \treturn n;\n }\n \n",
    "prefixes": [
        "20.11",
        "19/20"
    ]
}