get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68740,
    "url": "http://patches.dpdk.org/api/patches/68740/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1587110623-405-3-git-send-email-xuemingl@mellanox.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": "<1587110623-405-3-git-send-email-xuemingl@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1587110623-405-3-git-send-email-xuemingl@mellanox.com",
    "date": "2020-04-17T08:03:43",
    "name": "[RFC,v2,2/2] app/testpmd: support malloc and free tracking log",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": true,
    "hash": "3d39f2717f17c8542d55779434c795ae165e8c60",
    "submitter": {
        "id": 814,
        "url": "http://patches.dpdk.org/api/people/814/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@mellanox.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1587110623-405-3-git-send-email-xuemingl@mellanox.com/mbox/",
    "series": [
        {
            "id": 9454,
            "url": "http://patches.dpdk.org/api/series/9454/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9454",
            "date": "2020-04-17T08:03:41",
            "name": "malloc: support malloc and free tracking log",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/9454/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/68740/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/68740/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 D3C0BA058A;\n\tFri, 17 Apr 2020 10:04:15 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AF9FA1DE88;\n\tFri, 17 Apr 2020 10:03:58 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 1C2611DE41\n for <dev@dpdk.org>; Fri, 17 Apr 2020 10:03:55 +0200 (CEST)"
        ],
        "From": "Xueming Li <xuemingl@mellanox.com>",
        "To": "Anatoly Burakov <anatoly.burakov@intel.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>",
        "Cc": "dev@dpdk.org,\n\tAsaf Penso <asafp@mellanox.com>",
        "Date": "Fri, 17 Apr 2020 08:03:43 +0000",
        "Message-Id": "<1587110623-405-3-git-send-email-xuemingl@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": [
            "<1587110623-405-1-git-send-email-xuemingl@mellanox.com>",
            "<1586318694-31358-1-git-send-email-xuemingl@mellanox.com>"
        ],
        "References": [
            "<1587110623-405-1-git-send-email-xuemingl@mellanox.com>",
            "<1586318694-31358-1-git-send-email-xuemingl@mellanox.com>"
        ],
        "Subject": "[dpdk-dev] [RFC v2 2/2] app/testpmd: support malloc and free\n\ttracking log",
        "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": "New CLI commands to manipulate malloc tracking log:\n\ndump_malloc start <n>: start malloc tracking with number of buffers\ndump_malloc dump <n>:  dump mmalloc tracking log with detail level\ndump_malloc stop:      stop malloc tracking\n\nSigned-off-by: Xueming Li <xuemingl@mellanox.com>\n---\n app/test-pmd/cmdline.c                      | 60 ++++++++++++++++++++++++++++-\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++++++++\n 2 files changed, 74 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 863b567..0490823 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -9554,6 +9554,8 @@ struct cmd_rm_mirror_rule_result {\n \n struct cmd_dump_result {\n \tcmdline_fixed_string_t dump;\n+\tcmdline_fixed_string_t cmd;\n+\tuint32_t val;\n };\n \n static void\n@@ -9628,6 +9630,16 @@ static void cmd_dump_parsed(void *parsed_result,\n \t\tdump_socket_mem(stdout);\n \telse if (!strcmp(res->dump, \"dump_memzone\"))\n \t\trte_memzone_dump(stdout);\n+\telse if (!strcmp(res->dump, \"dump_malloc\")) {\n+\t\tif (!strcmp(res->cmd, \"start\")) {\n+\t\t\tif (rte_malloc_log_init(res->val))\n+\t\t\t\tfprintf(stdout, \"Failed to start logging\\n\");\n+\t\t} else if (!strcmp(res->cmd, \"dump\")) {\n+\t\t\trte_malloc_log_dump(stdout, res->val);\n+\t\t} else if (!strcmp(res->cmd, \"stop\")) {\n+\t\t\trte_malloc_log_stop();\n+\t\t}\n+\t}\n \telse if (!strcmp(res->dump, \"dump_struct_sizes\"))\n \t\tdump_struct_sizes();\n \telse if (!strcmp(res->dump, \"dump_ring\"))\n@@ -9650,7 +9662,50 @@ static void cmd_dump_parsed(void *parsed_result,\n \t\t\"dump_mempool#\"\n \t\t\"dump_devargs#\"\n \t\t\"dump_log_types\");\n-\n+cmdline_parse_token_string_t cmd_dump_malloc =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump,\n+\t\t\"dump_malloc\");\n+cmdline_parse_token_string_t cmd_dump_malloc_cmd_start =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, cmd,\n+\t\t\"start\");\n+cmdline_parse_token_string_t cmd_dump_malloc_cmd_dump =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, cmd,\n+\t\t\"dump\");\n+cmdline_parse_token_string_t cmd_dump_malloc_cmd_stop =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dump_result, cmd,\n+\t\t\"stop\");\n+cmdline_parse_token_num_t cmd_dump_val =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_dump_result, val, UINT32);\n+\n+cmdline_parse_inst_t cmd_dump_malloc_start = {\n+\t.f = cmd_dump_parsed,  /* function to call */\n+\t.help_str = \"Start rte_malloc tracking log with <count> buffer entries\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dump_malloc,\n+\t\t(void *)&cmd_dump_malloc_cmd_start,\n+\t\t(void *)&cmd_dump_val,\n+\t\tNULL,\n+\t},\n+};\n+cmdline_parse_inst_t cmd_dump_malloc_dump = {\n+\t.f = cmd_dump_parsed,  /* function to call */\n+\t.help_str = \"Dump rte_malloc tracking log with <level>, 0:summary, 1:leaks, 2: all\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dump_malloc,\n+\t\t(void *)&cmd_dump_malloc_cmd_dump,\n+\t\t(void *)&cmd_dump_val,\n+\t\tNULL,\n+\t},\n+};\n+cmdline_parse_inst_t cmd_dump_malloc_stop = {\n+\t.f = cmd_dump_parsed,  /* function to call */\n+\t.help_str = \"Stop rte_malloc tracking log\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dump_malloc,\n+\t\t(void *)&cmd_dump_malloc_cmd_stop,\n+\t\tNULL,\n+\t},\n+};\n cmdline_parse_inst_t cmd_dump = {\n \t.f = cmd_dump_parsed,  /* function to call */\n \t.data = NULL,      /* 2nd arg of func */\n@@ -19505,6 +19560,9 @@ struct cmd_showport_macs_result {\n \t(cmdline_parse_inst_t *)&cmd_showport_rss_hash_key,\n \t(cmdline_parse_inst_t *)&cmd_config_rss_hash_key,\n \t(cmdline_parse_inst_t *)&cmd_dump,\n+\t(cmdline_parse_inst_t *)&cmd_dump_malloc_start,\n+\t(cmdline_parse_inst_t *)&cmd_dump_malloc_dump,\n+\t(cmdline_parse_inst_t *)&cmd_dump_malloc_stop,\n \t(cmdline_parse_inst_t *)&cmd_dump_one,\n \t(cmdline_parse_inst_t *)&cmd_ethertype_filter,\n \t(cmdline_parse_inst_t *)&cmd_syn_filter,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex dcee5de..1c55f23 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -567,6 +567,21 @@ Dumps the statistics of all or specific memory pool::\n \n    testpmd> dump_mempool [mempool_name]\n \n+dump malloc\n+~~~~~~~~~~~~\n+\n+Start rte_malloc and rte_free tracking with number of buffers::\n+\n+   testpmd> dump_malloc start <count>\n+\n+Dump tracking result with different level, 0:summary, 1:leaks, 2: all::\n+\n+   testpmd> dump_malloc dump <level>\n+\n+Stop tracking::\n+\n+   testpmd> dump_malloc stop\n+\n dump devargs\n ~~~~~~~~~~~~\n \n",
    "prefixes": [
        "RFC",
        "v2",
        "2/2"
    ]
}