get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111273,
    "url": "https://patches.dpdk.org/api/patches/111273/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220518065806.1005694-1-stevex.yang@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": "<20220518065806.1005694-1-stevex.yang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220518065806.1005694-1-stevex.yang@intel.com",
    "date": "2022-05-18T06:58:06",
    "name": "[v3] app/testpmd: support ddp dump command for ice",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "bb28c3ffa6de4fdb549f13a6eb5b59e0f71cb6e2",
    "submitter": {
        "id": 1883,
        "url": "https://patches.dpdk.org/api/people/1883/?format=api",
        "name": "Steve Yang",
        "email": "stevex.yang@intel.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220518065806.1005694-1-stevex.yang@intel.com/mbox/",
    "series": [
        {
            "id": 22986,
            "url": "https://patches.dpdk.org/api/series/22986/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22986",
            "date": "2022-05-18T06:58:06",
            "name": "[v3] app/testpmd: support ddp dump command for ice",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/22986/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/111273/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/111273/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 DB149A0503;\n\tWed, 18 May 2022 09:06:47 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8EBE040156;\n\tWed, 18 May 2022 09:06:47 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 9D827400D6\n for <dev@dpdk.org>; Wed, 18 May 2022 09:06:46 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 May 2022 00:06:45 -0700",
            "from intel-cd-odc-steve.cd.intel.com ([10.240.178.191])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 May 2022 00:06:43 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1652857606; x=1684393606;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=n0SsckE9q3qnviwNGruLmrY22HZZraXWHgh7NgLVoZE=;\n b=GUePonbRibNmhEd8SHFH655t+eGgeJj3L2TOoFEiwVCQBNEU7qXmsE+T\n bgc/IrnQk0Ofs22LAw6fgpw/LpYDthBSB4FzO8vE8Wcv/GmtoirPs/bAG\n q8hAw5cFTavppqqju7eX7KtWgdDlLpMUmU80kOBYypQKK4clUHILsl+2l\n dr6GHeHVwQYmZ6aA1fm94BK4S532IlrzQVIuzh35fmGr+XNn/KPfvUIKZ\n qzRoK+0xnWvwQuFi1faBww8Rpkk6U8ZA7ee9SlJkAy5F/PF7tzZ7rNEJ+\n ioUoYtBNIyXOdY2NT+DeUVRWgBT09EDse67PTgV8m7QvaQyWMTukEqePx Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10350\"; a=\"271649436\"",
            "E=Sophos;i=\"5.91,234,1647327600\"; d=\"scan'208\";a=\"271649436\"",
            "E=Sophos;i=\"5.91,234,1647327600\"; d=\"scan'208\";a=\"569303462\""
        ],
        "From": "Steve Yang <stevex.yang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "yuying.zhang@intel.com, qi.z.zhang@intel.com,\n Steve Yang <stevex.yang@intel.com>",
        "Subject": "[PATCH v3] app/testpmd: support ddp dump command for ice",
        "Date": "Wed, 18 May 2022 06:58:06 +0000",
        "Message-Id": "<20220518065806.1005694-1-stevex.yang@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20220512020618.474816-1-stevex.yang@intel.com>",
        "References": "<20220512020618.474816-1-stevex.yang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Dump DDP runtime configure into a binary(package) file from ice PF port.\n\nAdd command line:\n    ddp dump <port_id> <config_path>\n\nParameters:\n    <port_id>       the PF Port ID\n    <config_path>   dumped runtime configure file, if not a absolute path,\n                    it will be dumped to testpmd running directory.\n\nFor example:\ntestpmd> ddp dump 0 current.pkg\n\nIf you want to dump ice VF DDP runtime configure, you need bind other\nunused PF port of the NIC first, and then dump the PF's runtime configure\nas target output.\n\nSigned-off-by: Steve Yang <stevex.yang@intel.com>\n\n---\nv3: change git commit log\n---\n app/test-pmd/cmdline.c   | 76 ++++++++++++++++++++++++++++++++++++++++\n app/test-pmd/meson.build |  3 ++\n 2 files changed, 79 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 6ffea8e21a..6282981ee9 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -60,6 +60,9 @@\n #ifdef RTE_NET_I40E\n #include <rte_pmd_i40e.h>\n #endif\n+#ifdef RTE_NET_ICE\n+#include <rte_pmd_ice.h>\n+#endif\n #ifdef RTE_NET_BNXT\n #include <rte_pmd_bnxt.h>\n #endif\n@@ -654,6 +657,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"set link-down port (port_id)\\n\"\n \t\t\t\"\tSet link down for a port.\\n\\n\"\n \n+\t\t\t\"ddp dump (port_id) (config_path)\\n\"\n+\t\t\t\"    Dump a runtime configure on a port\\n\\n\"\n+\n \t\t\t\"ddp add (port_id) (profile_path[,backup_profile_path])\\n\"\n \t\t\t\"    Load a profile package on a port\\n\\n\"\n \n@@ -14471,6 +14477,75 @@ cmdline_parse_inst_t cmd_strict_link_prio = {\n \t},\n };\n \n+/* Dump device ddp package, only for ice PF */\n+struct cmd_ddp_dump_result {\n+\tcmdline_fixed_string_t ddp;\n+\tcmdline_fixed_string_t add;\n+\tportid_t port_id;\n+\tchar filepath[];\n+};\n+\n+cmdline_parse_token_string_t cmd_ddp_dump_ddp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_ddp_dump_result, ddp, \"ddp\");\n+cmdline_parse_token_string_t cmd_ddp_dump_dump =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_ddp_dump_result, add, \"dump\");\n+cmdline_parse_token_num_t cmd_ddp_dump_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_ddp_dump_result, port_id, RTE_UINT16);\n+cmdline_parse_token_string_t cmd_ddp_dump_filepath =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_ddp_dump_result, filepath, NULL);\n+\n+static void\n+cmd_ddp_dump_parsed(\n+\tvoid *parsed_result,\n+\t__rte_unused struct cmdline *cl,\n+\t__rte_unused void *data)\n+{\n+\tstruct cmd_ddp_dump_result *res = parsed_result;\n+\tuint8_t *buff;\n+\tuint32_t size;\n+\tint ret = -ENOTSUP;\n+\n+#define ICE_BUFF_SIZE\t0x000c9000\n+\tsize = ICE_BUFF_SIZE;\n+\tbuff = (uint8_t *)malloc(ICE_BUFF_SIZE);\n+\tif (buff) {\n+#ifdef RTE_NET_ICE\n+\t\tret = rte_pmd_ice_dump_package(res->port_id, &buff, &size);\n+#endif\n+\t\tswitch (ret) {\n+\t\tcase 0:\n+\t\t\tsave_file(res->filepath, buff, size);\n+\t\t\tbreak;\n+\t\tcase -EINVAL:\n+\t\t\tfprintf(stderr, \"Invalid buffer size\\n\");\n+\t\t\tbreak;\n+\t\tcase -ENOTSUP:\n+\t\t\tfprintf(stderr,\n+\t\t\t\t\"Device doesn't support \"\n+\t\t\t\t\"dump DDP runtime configure.\\n\");\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tfprintf(stderr,\n+\t\t\t\t\"Failed to dump DDP runtime configure,\"\n+\t\t\t\t\" error: (%s)\\n\", strerror(-ret));\n+\t\t}\n+\t}\n+\tfree(buff);\n+}\n+\n+cmdline_parse_inst_t cmd_ddp_dump = {\n+\t.f = cmd_ddp_dump_parsed,\n+\t.data = NULL,\n+\t.help_str = \"ddp dump <port_id> <config_path>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_ddp_dump_ddp,\n+\t\t(void *)&cmd_ddp_dump_dump,\n+\t\t(void *)&cmd_ddp_dump_port_id,\n+\t\t(void *)&cmd_ddp_dump_filepath,\n+\t\tNULL,\n+\t},\n+};\n+\n /* Load dynamic device personalization*/\n struct cmd_ddp_add_result {\n \tcmdline_fixed_string_t ddp;\n@@ -18025,6 +18100,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_ddp_del,\n \t(cmdline_parse_inst_t *)&cmd_ddp_get_list,\n \t(cmdline_parse_inst_t *)&cmd_ddp_get_info,\n+\t(cmdline_parse_inst_t *)&cmd_ddp_dump,\n \t(cmdline_parse_inst_t *)&cmd_cfg_input_set,\n \t(cmdline_parse_inst_t *)&cmd_clear_input_set,\n \t(cmdline_parse_inst_t *)&cmd_show_vf_stats,\ndiff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build\nindex 43130c8856..569e039bf7 100644\n--- a/app/test-pmd/meson.build\n+++ b/app/test-pmd/meson.build\n@@ -67,6 +67,9 @@ endif\n if dpdk_conf.has('RTE_NET_I40E')\n     deps += 'net_i40e'\n endif\n+if dpdk_conf.has('RTE_NET_ICE')\n+    deps += 'net_ice'\n+endif\n if dpdk_conf.has('RTE_NET_IXGBE')\n     deps += 'net_ixgbe'\n endif\n",
    "prefixes": [
        "v3"
    ]
}