get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21242,
    "url": "https://patches.dpdk.org/api/patches/21242/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1488526784-16621-6-git-send-email-beilei.xing@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1488526784-16621-6-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1488526784-16621-6-git-send-email-beilei.xing@intel.com",
    "date": "2017-03-03T07:39:44",
    "name": "[dpdk-dev,v2,5/5] app/testpmd: add command for getting loaded profiles",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e86225ed3e7423f177b184e664079563673582e5",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1488526784-16621-6-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/21242/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/21242/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 47E61F96D;\n\tFri,  3 Mar 2017 08:41:27 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id D206FF610\n\tfor <dev@dpdk.org>; Fri,  3 Mar 2017 08:41:01 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga104.jf.intel.com with ESMTP; 02 Mar 2017 23:41:01 -0800",
            "from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31])\n\tby orsmga002.jf.intel.com with ESMTP; 02 Mar 2017 23:41:00 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.35,235,1484035200\"; d=\"scan'208\";a=\"55373003\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com",
        "Cc": "helin.zhang@intel.com,\n\tdev@dpdk.org",
        "Date": "Fri,  3 Mar 2017 15:39:44 +0800",
        "Message-Id": "<1488526784-16621-6-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1488526784-16621-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1488525977-15321-7-git-send-email-beilei.xing@intel.com>\n\t<1488526784-16621-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 5/5] app/testpmd: add command for getting\n\tloaded profiles",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch is to add testpmd CLI for getting all loaded profiles.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n app/test-pmd/cmdline.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h |  1 +\n 2 files changed, 61 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 6b6af87..b231c04 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -12455,6 +12455,65 @@ cmdline_parse_inst_t cmd_write_ppp = {\n \t\tNULL,\n \t},\n };\n+\n+/* Get Pipeline Personalization Profile list*/\n+#define PROFILE_INFO_SIZE 48\n+#define MAX_PROFILE_NUM 16\n+\n+struct cmd_get_ppp_list_result {\n+\tcmdline_fixed_string_t get;\n+\tcmdline_fixed_string_t ppp;\n+\tcmdline_fixed_string_t list;\n+\tuint8_t port_id;\n+};\n+\n+cmdline_parse_token_string_t cmd_get_ppp_list_get =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_get_ppp_list_result, get, \"get\");\n+cmdline_parse_token_string_t cmd_get_ppp_list_ppp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_get_ppp_list_result, ppp, \"ppp\");\n+cmdline_parse_token_string_t cmd_get_ppp_list_list =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_get_ppp_list_result, list, \"list\");\n+cmdline_parse_token_num_t cmd_get_ppp_list_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_get_ppp_list_result, port_id, UINT8);\n+\n+static void\n+cmd_get_ppp_list_parsed(\n+\tvoid *parsed_result,\n+\t__attribute__((unused)) struct cmdline *cl,\n+\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_get_ppp_list_result *res = parsed_result;\n+\tuint8_t *buff;\n+\tint ret;\n+\n+\tif (res->port_id > nb_ports) {\n+\t\tprintf(\"Invalid port, range is [0, %d]\\n\", nb_ports - 1);\n+\t\treturn;\n+\t}\n+\n+\tbuff = (uint8_t *)malloc(PROFILE_INFO_SIZE * MAX_PROFILE_NUM + 4);\n+\tif (!buff)\n+\t\tprintf(\"%s: Failed to malloc buffer\\n\", __func__);\n+\n+\tret = i40e_get_ppp_list(res->port_id, buff);\n+\tif (ret < 0)\n+\t\tprintf(\"Failed to get ppp list\\n\");\n+\n+\tfree(buff);\n+}\n+\n+cmdline_parse_inst_t cmd_get_ppp_list = {\n+\t.f = cmd_get_ppp_list_parsed,\n+\t.data = NULL,\n+\t.help_str = \"get ppp list <port_id>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_get_ppp_list_get,\n+\t\t(void *)&cmd_get_ppp_list_ppp,\n+\t\t(void *)&cmd_get_ppp_list_list,\n+\t\t(void *)&cmd_get_ppp_list_port_id,\n+\t\tNULL,\n+\t},\n+};\n /* ******************************************************************************** */\n \n /* list of instructions */\n@@ -12631,6 +12690,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_set_vf_broadcast,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_vlan_tag,\n \t(cmdline_parse_inst_t *)&cmd_write_ppp,\n+\t(cmdline_parse_inst_t *)&cmd_get_ppp_list,\n \tNULL,\n };\n \ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 2a7f683..a7aa218 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -624,6 +624,7 @@ void port_dcb_info_display(uint8_t port_id);\n \n uint8_t *open_package_file(const char *file_path);\n int close_package_file(uint8_t *buf);\n+void get_ppp_list(uint8_t port_id);\n \n enum print_warning {\n \tENABLED_WARN = 0,\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "5/5"
    ]
}