get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75842,
    "url": "http://patches.dpdk.org/api/patches/75842/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200821162944.29840-18-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200821162944.29840-18-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200821162944.29840-18-bruce.richardson@intel.com",
    "date": "2020-08-21T16:29:43",
    "name": "[v2,17/18] raw/ioat: add xstats tracking for idxd devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "da5e278a1d07a541d37ff8c37f217c44893968e3",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200821162944.29840-18-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 11744,
            "url": "http://patches.dpdk.org/api/series/11744/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11744",
            "date": "2020-08-21T16:29:26",
            "name": "raw/ioat: enhancements and new hardware support",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/11744/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/75842/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/75842/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 79C5DA04AF;\n\tFri, 21 Aug 2020 18:33:26 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA2691C0B7;\n\tFri, 21 Aug 2020 18:30:51 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id D29261C1B6\n for <dev@dpdk.org>; Fri, 21 Aug 2020 18:30:49 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Aug 2020 09:30:49 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.56])\n by orsmga006.jf.intel.com with ESMTP; 21 Aug 2020 09:30:47 -0700"
        ],
        "IronPort-SDR": [
            "\n 9rrSl/smJc+YwnvE0xKwGvO21MzHRHVgev1V2PkS88FSc99iMwXwYa00cLI00kfREf8Xtbxbsv\n VZgQyd4AYOjQ==",
            "\n nNTlLystu8ZESBST3DC0DmDx8siO31oIu1GE8NT533uN1VaZek7skURaV1rl5rWxUtSiMkWv/g\n 4E4sfY/ixK4Q=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9719\"; a=\"173615979\"",
            "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"173615979\"",
            "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"297992992\""
        ],
        "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, ping.yu@intel.com,\n kevin.laatz@intel.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 21 Aug 2020 17:29:43 +0100",
        "Message-Id": "<20200821162944.29840-18-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200821162944.29840-1-bruce.richardson@intel.com>",
        "References": "<20200721095140.719297-1-bruce.richardson@intel.com>\n <20200821162944.29840-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 17/18] raw/ioat: add xstats tracking for idxd\n\tdevices",
        "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 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 | 30 +++++++++++++++-----------\n 4 files changed, 25 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c\nindex 1ae20bc04f..4b97b5b5fd 100644\n--- a/drivers/raw/ioat/idxd_pci.c\n+++ b/drivers/raw/ioat/idxd_pci.c\n@@ -106,6 +106,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 3d6aa31f48..febc5919f4 100644\n--- a/drivers/raw/ioat/idxd_vdev.c\n+++ b/drivers/raw/ioat/idxd_vdev.c\n@@ -35,6 +35,9 @@ static const struct rte_rawdev_ops idxd_vdev_ops = {\n \t\t.dump = idxd_dev_dump,\n \t\t.dev_configure = idxd_dev_configure,\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 082b3091c4..db10178871 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -274,5 +274,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 66e3f1a836..db8608fa6b 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,19 +332,15 @@ __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 (b->op_count >= BATCH_SIZE) {\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\tgoto failed;\n+\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@@ -361,7 +359,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@@ -388,6 +392,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@@ -424,6 +429,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": [
        "v2",
        "17/18"
    ]
}