get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97417,
    "url": "http://patchwork.dpdk.org/api/patches/97417/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/62f65b58824532acbb53784d64ef260d5c9c90a1.1630046292.git.gmuthukrishn@marvell.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": "<62f65b58824532acbb53784d64ef260d5c9c90a1.1630046292.git.gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/62f65b58824532acbb53784d64ef260d5c9c90a1.1630046292.git.gmuthukrishn@marvell.com",
    "date": "2021-08-27T06:41:59",
    "name": "[v5,2/2] mempool/cnxk: add telemetry end points",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e968b5bdc2057295963353757e9044b7af8fd11e",
    "submitter": {
        "id": 2301,
        "url": "http://patchwork.dpdk.org/api/people/2301/?format=api",
        "name": "Gowrishankar Muthukrishnan",
        "email": "gmuthukrishn@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patchwork.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/62f65b58824532acbb53784d64ef260d5c9c90a1.1630046292.git.gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 18491,
            "url": "http://patchwork.dpdk.org/api/series/18491/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18491",
            "date": "2021-08-27T06:41:57",
            "name": "cnxk: enable npa and mempool telemetry",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/18491/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97417/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97417/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A216CA0C43;\n\tFri, 27 Aug 2021 08:42:19 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6DD9841249;\n\tFri, 27 Aug 2021 08:42:15 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 0DE9E4121F\n for <dev@dpdk.org>; Fri, 27 Aug 2021 08:42:13 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id\n 17R3s37B012747;\n Thu, 26 Aug 2021 23:42:13 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3aprj60g4w-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 26 Aug 2021 23:42:13 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Thu, 26 Aug 2021 23:42:11 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Thu, 26 Aug 2021 23:42:11 -0700",
            "from localhost.localdomain (unknown [10.28.34.38])\n by maili.marvell.com (Postfix) with ESMTP id EDC675B692B;\n Thu, 26 Aug 2021 23:42:08 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=YCkb7k6ihP50LGAh8wWFWp27i+xlUW7XZrY8R0FvwmE=;\n b=hBysk5Wi4j+VDrFVn855hlqeOoo2fqe/5MSwIcuisFVvlnMbdXrquKrvRWpXZ9DWiRXW\n RYRyaQKle7+WYXLm0iEDfwgluNV/7nTARftR5/yp7X5trwddSuv5En2odOhpjbS9VGCR\n XO3TgODeBrdvEi7keh+jgBvDI9sdlNfxNcYe9DmcsT6z6o64yBe+aOJ9rb7wWNTFk4zY\n dMrkCeRp83ynmq5O3ETkLrjaw4qqqQI9qo+quA7kHBduFj2siI1JzvLhnJNizdLyn5GJ\n Z1G8KEihgfOp9VVNhHU+b7t0pPUqAzlGcWxTkKHt/cVm5nV5HO5VSv09G3ZO5kLnd859 Mw==",
        "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<bruce.richardson@intel.com>, <ciara.power@intel.com>,\n <thomas@monjalon.net>, <jerinj@marvell.com>, <kirankumark@marvell.com>,\n <ndabilpuram@marvell.com>, <skori@marvell.com>, <skoteshwar@marvell.com>,\n Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "Date": "Fri, 27 Aug 2021 12:11:59 +0530",
        "Message-ID": "\n <62f65b58824532acbb53784d64ef260d5c9c90a1.1630046292.git.gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<cover.1630046292.git.gmuthukrishn@marvell.com>",
        "References": "<cover.1630046292.git.gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "2pIQyHM0dAUmbSAYn_Qy28nxkvqL9HGD",
        "X-Proofpoint-GUID": "2pIQyHM0dAUmbSAYn_Qy28nxkvqL9HGD",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-08-27_02,2021-08-26_02,2020-04-07_01",
        "Subject": "[dpdk-dev] [v5, 2/2] mempool/cnxk: add telemetry end points",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Adding telemetry end points to cnxk mempool driver.\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\n---\n drivers/mempool/cnxk/cnxk_mempool_telemetry.c | 100 ++++++++++++++++++\n drivers/mempool/cnxk/meson.build              |   3 +-\n 2 files changed, 102 insertions(+), 1 deletion(-)\n create mode 100644 drivers/mempool/cnxk/cnxk_mempool_telemetry.c",
    "diff": "diff --git a/drivers/mempool/cnxk/cnxk_mempool_telemetry.c b/drivers/mempool/cnxk/cnxk_mempool_telemetry.c\nnew file mode 100644\nindex 0000000000..690f557f62\n--- /dev/null\n+++ b/drivers/mempool/cnxk/cnxk_mempool_telemetry.c\n@@ -0,0 +1,100 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2021 Marvell.\n+ */\n+\n+#include <rte_mempool.h>\n+#include <rte_memzone.h>\n+#include <rte_telemetry.h>\n+\n+#include <roc_api.h>\n+\n+#include \"cnxk_mempool.h\"\n+#include \"cnxk_telemetry.h\"\n+\n+static void\n+mempool_list_cb(struct rte_mempool *mp, void *arg)\n+{\n+\tstruct rte_tel_data *d = (struct rte_tel_data *)arg;\n+\n+\trte_tel_data_add_array_string(d, mp->name);\n+}\n+\n+static int\n+mempool_tel_handle_list(const char *cmd __rte_unused,\n+\t\t\tconst char *params __rte_unused, struct rte_tel_data *d)\n+{\n+\trte_tel_data_start_array(d, RTE_TEL_STRING_VAL);\n+\trte_mempool_walk(mempool_list_cb, d);\n+\treturn 0;\n+}\n+\n+struct mempool_info_cb_arg {\n+\tchar *pool_name;\n+\tstruct rte_tel_data *d;\n+};\n+\n+static void\n+mempool_info_cb(struct rte_mempool *mp, void *arg)\n+{\n+\tstruct mempool_info_cb_arg *info = (struct mempool_info_cb_arg *)arg;\n+\tconst struct rte_memzone *mz;\n+\tint aura_id;\n+\n+\tif (strncmp(mp->name, info->pool_name, RTE_MEMZONE_NAMESIZE))\n+\t\treturn;\n+\n+\tCNXK_TEL_DICT_STR(info->d, mp, name);\n+\tCNXK_TEL_DICT_INT(info->d, mp, pool_id);\n+\tCNXK_TEL_DICT_INT(info->d, mp, flags);\n+\tCNXK_TEL_DICT_INT(info->d, mp, socket_id);\n+\tCNXK_TEL_DICT_INT(info->d, mp, size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, cache_size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, elt_size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, header_size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, trailer_size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, private_data_size);\n+\tCNXK_TEL_DICT_INT(info->d, mp, ops_index);\n+\tCNXK_TEL_DICT_INT(info->d, mp, populated_size);\n+\n+\taura_id = roc_npa_aura_handle_to_aura(mp->pool_id);\n+\trte_tel_data_add_dict_int(info->d, \"aura_id\", aura_id);\n+\n+\tmz = mp->mz;\n+\tCNXK_TEL_DICT_STR(info->d, mz, name, mz_);\n+\tCNXK_TEL_DICT_PTR(info->d, mz, iova, mz_);\n+\tCNXK_TEL_DICT_PTR(info->d, mz, addr, mz_);\n+\tCNXK_TEL_DICT_INT(info->d, mz, len, mz_);\n+\tCNXK_TEL_DICT_U64(info->d, mz, hugepage_sz, mz_);\n+\tCNXK_TEL_DICT_INT(info->d, mz, socket_id, mz_);\n+\tCNXK_TEL_DICT_INT(info->d, mz, flags, mz_);\n+}\n+\n+static int\n+mempool_tel_handle_info(const char *cmd __rte_unused, const char *params,\n+\t\t\tstruct rte_tel_data *d)\n+{\n+\tstruct mempool_info_cb_arg mp_arg;\n+\tchar name[RTE_MEMZONE_NAMESIZE];\n+\n+\tif (params == NULL || strlen(params) == 0)\n+\t\treturn -1;\n+\n+\trte_strlcpy(name, params, RTE_MEMZONE_NAMESIZE);\n+\n+\trte_tel_data_start_dict(d);\n+\tmp_arg.pool_name = name;\n+\tmp_arg.d = d;\n+\trte_mempool_walk(mempool_info_cb, &mp_arg);\n+\n+\treturn 0;\n+}\n+\n+RTE_INIT(cnxk_mempool_init_telemetry)\n+{\n+\trte_telemetry_register_cmd(\n+\t\t\"/cnxk/mempool/list\", mempool_tel_handle_list,\n+\t\t\"Returns list of available mempools. Takes no parameters\");\n+\trte_telemetry_register_cmd(\n+\t\t\"/cnxk/mempool/info\", mempool_tel_handle_info,\n+\t\t\"Returns mempool info. Parameters: pool_name\");\n+}\ndiff --git a/drivers/mempool/cnxk/meson.build b/drivers/mempool/cnxk/meson.build\nindex e28a9e044d..7834a19118 100644\n--- a/drivers/mempool/cnxk/meson.build\n+++ b/drivers/mempool/cnxk/meson.build\n@@ -11,8 +11,9 @@ endif\n sources = files(\n         'cnxk_mempool.c',\n         'cnxk_mempool_ops.c',\n+        'cnxk_mempool_telemetry.c',\n         'cn9k_mempool_ops.c',\n         'cn10k_mempool_ops.c',\n )\n \n-deps += ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool']\n+deps += ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool', 'telemetry']\n",
    "prefixes": [
        "v5",
        "2/2"
    ]
}