get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49471,
    "url": "http://patches.dpdk.org/api/patches/49471/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190107153829.34047-8-vipin.varghese@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": "<20190107153829.34047-8-vipin.varghese@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190107153829.34047-8-vipin.varghese@intel.com",
    "date": "2019-01-07T15:38:29",
    "name": "[v8,7/7] app/procinfo: add support for iter mempool",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "20cc1c87ce9d75aa0e93ad2c197981a32d38413d",
    "submitter": {
        "id": 882,
        "url": "http://patches.dpdk.org/api/people/882/?format=api",
        "name": "Varghese, Vipin",
        "email": "vipin.varghese@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/20190107153829.34047-8-vipin.varghese@intel.com/mbox/",
    "series": [
        {
            "id": 3028,
            "url": "http://patches.dpdk.org/api/series/3028/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3028",
            "date": "2019-01-07T15:38:22",
            "name": "app/proc-info: enhance debug of proc-info tool",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/3028/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/49471/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/49471/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0765A1B51B;\n\tMon,  7 Jan 2019 10:42:10 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id BEFC01B523\n\tfor <dev@dpdk.org>; Mon,  7 Jan 2019 10:42:08 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jan 2019 01:42:08 -0800",
            "from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203])\n\tby orsmga005.jf.intel.com with ESMTP; 07 Jan 2019 01:42:05 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,450,1539673200\"; d=\"scan'208\";a=\"289445041\"",
        "From": "Vipin Varghese <vipin.varghese@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net",
        "Cc": "reshma.pattan@intel.com, john.mcnamara@intel.com, amol.patel@intel.com, \n\tstephen@networkplumber.org, konstantin.ananyev@intel.com,\n\tjasvinder.singh@intel.com, Vipin Varghese <vipin.varghese@intel.com>",
        "Date": "Mon,  7 Jan 2019 21:08:29 +0530",
        "Message-Id": "<20190107153829.34047-8-vipin.varghese@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190107153829.34047-1-vipin.varghese@intel.com>",
        "References": "<20181213050842.64587-1-vipin.varghese@intel.com>\n\t<20190107153829.34047-1-vipin.varghese@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 7/7] app/procinfo: add support for iter mempool",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Function iter_mempool is used for iterating slected mempool elements\nand display the contents of elements for a max of 256 bytes. In case\nof invalid or no name for mempool, no information is displayed.\n\nSigned-off-by: Vipin Varghese <vipin.varghese@intel.com>\nAcked-by: Reshma  Pattan <reshma.pattan@intel.com>\nAcked-by: John McNamara <john.mcnamara@intel.com>\n---\n app/proc-info/main.c           | 48 +++++++++++++++++++++++++++++++++-\n doc/guides/tools/proc_info.rst |  6 ++++-\n 2 files changed, 52 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex 4aeab926d..b9acfa9ec 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -33,6 +33,7 @@\n #include <rte_security.h>\n #include <rte_cryptodev.h>\n #include <rte_tm.h>\n+#include <rte_hexdump.h>\n \n /* Maximum long option length for option parsing. */\n #define MAX_LONG_OPT_SZ 64\n@@ -88,6 +89,9 @@ static char *ring_name;\n /**< Enable show mempool. */\n static uint32_t enable_shw_mempool;\n static char *mempool_name;\n+/**< Enable iter mempool. */\n+static uint32_t enable_iter_mempool;\n+static char *mempool_iter_name;\n \n /**< display usage */\n static void\n@@ -112,7 +116,8 @@ proc_info_usage(const char *prgname)\n \t\t\"  --show-tm: to display traffic manager information for ports\\n\"\n \t\t\"  --show-crypto: to display crypto information\\n\"\n \t\t\"  --show-ring[=name]: to display ring information\\n\"\n-\t\t\"  --show-mempool[=name]: to display mempool information\\n\",\n+\t\t\"  --show-mempool[=name]: to display mempool information\\n\"\n+\t\t\"  --iter-mempool=name: iterate mempool elements to display content\\n\",\n \t\tprgname);\n }\n \n@@ -224,6 +229,7 @@ proc_info_parse_args(int argc, char **argv)\n \t\t{\"show-crypto\", 0, NULL, 0},\n \t\t{\"show-ring\", optional_argument, NULL, 0},\n \t\t{\"show-mempool\", optional_argument, NULL, 0},\n+\t\t{\"iter-mempool\", required_argument, NULL, 0},\n \t\t{NULL, 0, 0, 0}\n \t};\n \n@@ -284,6 +290,10 @@ proc_info_parse_args(int argc, char **argv)\n \t\t\t\t\t\"show-mempool\", MAX_LONG_OPT_SZ)) {\n \t\t\t\tenable_shw_mempool = 1;\n \t\t\t\tmempool_name = optarg;\n+\t\t\t} else if (!strncmp(long_option[option_index].name,\n+\t\t\t\t\t\"iter-mempool\", MAX_LONG_OPT_SZ)) {\n+\t\t\t\tenable_iter_mempool = 1;\n+\t\t\t\tmempool_iter_name = optarg;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase 1:\n@@ -1179,6 +1189,40 @@ show_mempool(char *name)\n \tSTATS_BDR_STR(50, \"\");\n }\n \n+static void\n+mempool_itr_obj(struct rte_mempool *mp, void *opaque,\n+\t\tvoid *obj, unsigned int obj_idx)\n+{\n+\tprintf(\"  - obj_idx %u opaque %p obj %p\\n\",\n+\t\t\tobj_idx, opaque, obj);\n+\n+\tif (obj)\n+\t\trte_hexdump(stdout, \" Obj Content\",\n+\t\t\t\tobj, (mp->elt_size > 256)?256:mp->elt_size);\n+}\n+\n+static void\n+iter_mempool(char *name)\n+{\n+\tsnprintf(bdr_str, MAX_STRING_LEN, \" iter - MEMPOOL %\"PRIu64,\n+\t\t\trte_get_tsc_hz());\n+\tSTATS_BDR_STR(10, bdr_str);\n+\n+\tif (name != NULL) {\n+\t\tstruct rte_mempool *ptr = rte_mempool_lookup(name);\n+\t\tif (ptr != NULL) {\n+\t\t\t/* iterate each object */\n+\t\t\tuint32_t ret = rte_mempool_obj_iter(ptr,\n+\t\t\t\t\tmempool_itr_obj, NULL);\n+\t\t\tprintf(\"\\n  - iterated %u objects\\n\", ret);\n+\t\t\tSTATS_BDR_STR(50, \"\");\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n+\tSTATS_BDR_STR(50, \"\");\n+}\n+\n int\n main(int argc, char **argv)\n {\n@@ -1270,6 +1314,8 @@ main(int argc, char **argv)\n \t\tshow_ring(ring_name);\n \tif (enable_shw_mempool)\n \t\tshow_mempool(mempool_name);\n+\tif (enable_iter_mempool)\n+\t\titer_mempool(mempool_iter_name);\n \n \tret = rte_eal_cleanup();\n \tif (ret)\ndiff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst\nindex 42c5d45e0..6bdf5a861 100644\n--- a/doc/guides/tools/proc_info.rst\n+++ b/doc/guides/tools/proc_info.rst\n@@ -19,7 +19,7 @@ The application has a number of command line options:\n \n    ./$(RTE_TARGET)/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats |\n    --stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |\n-   --show-ring[=name] | --show-mempool[=name] ]\n+   --show-ring[=name] | --show-mempool[=name] | --iter-mempool=name ]\n \n Parameters\n ~~~~~~~~~~\n@@ -65,6 +65,10 @@ The show-mempool parameter display current allocation of all mempool\n debug information. Specifying the name allows to display details for specific\n specific mempool. For invalid or no mempool name, whole list is dump.\n \n+**--iter-mempool=name**\n+The iter-mempool parameter iterates and displays mempool elements specified\n+by name. For invalid or no mempool name no elements are displayed.\n+\n Limitations\n -----------\n \n",
    "prefixes": [
        "v8",
        "7/7"
    ]
}