get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49618,
    "url": "http://patches.dpdk.org/api/patches/49618/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190110213645.29901-7-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": "<20190110213645.29901-7-vipin.varghese@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190110213645.29901-7-vipin.varghese@intel.com",
    "date": "2019-01-10T21:36:45",
    "name": "[v9,6/6] app/procinfo: add support for iter mempool",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20190110213645.29901-7-vipin.varghese@intel.com/mbox/",
    "series": [
        {
            "id": 3099,
            "url": "http://patches.dpdk.org/api/series/3099/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3099",
            "date": "2019-01-10T21:36:39",
            "name": "app/proc-info: enhance debug of proc-info tool",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/3099/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/49618/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/49618/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 9AF671B6CA;\n\tThu, 10 Jan 2019 16:40:24 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 074341B1E6\n\tfor <dev@dpdk.org>; Thu, 10 Jan 2019 16:40:22 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Jan 2019 07:40:22 -0800",
            "from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203])\n\tby fmsmga006.fm.intel.com with ESMTP; 10 Jan 2019 07:40:19 -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,461,1539673200\"; d=\"scan'208\";a=\"309300785\"",
        "From": "Vipin Varghese <vipin.varghese@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net,\n\tjohn.mcnamara@intel.com",
        "Cc": "konstantin.ananyev@intel.com, stephen@networkplumber.org,\n\treshma.pattan@intel.com, jasvinder.singh@intel.com,\n\tstephen1.byrne@intel.com, amol.patel@intel.com,\n\tVipin Varghese <vipin.varghese@intel.com>",
        "Date": "Fri, 11 Jan 2019 03:06:45 +0530",
        "Message-Id": "<20190110213645.29901-7-vipin.varghese@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190110213645.29901-1-vipin.varghese@intel.com>",
        "References": "<20190107153829.34047-2-vipin.varghese@intel.com>\n\t<20190110213645.29901-1-vipin.varghese@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v9 6/6] 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": [
        "v9",
        "6/6"
    ]
}