get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 19301,
    "url": "http://patchwork.dpdk.org/api/patches/19301/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1484290401-1404-23-git-send-email-wenzhuo.lu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1484290401-1404-23-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1484290401-1404-23-git-send-email-wenzhuo.lu@intel.com",
    "date": "2017-01-13T06:53:17",
    "name": "[dpdk-dev,v9,22/26] app/testpmd: add command to test VF VLAN tag on i40e",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "db4ece20236463c68208004207168e740dbe9040",
    "submitter": {
        "id": 258,
        "url": "http://patchwork.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1484290401-1404-23-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/19301/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/19301/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 C9FFCF97C;\n\tFri, 13 Jan 2017 07:54:59 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 82D5BF63E\n\tfor <dev@dpdk.org>; Fri, 13 Jan 2017 07:53:50 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP; 12 Jan 2017 22:53:50 -0800",
            "from dpdk26.sh.intel.com ([10.239.128.228])\n\tby fmsmga005.fm.intel.com with ESMTP; 12 Jan 2017 22:53:49 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,220,1477983600\"; d=\"scan'208\";a=\"52749826\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "Date": "Fri, 13 Jan 2017 14:53:17 +0800",
        "Message-Id": "<1484290401-1404-23-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1484290401-1404-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1484290401-1404-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v9 22/26] app/testpmd: add command to test VF\n\tVLAN tag on i40e",
        "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": "From: Bernard Iremonger <bernard.iremonger@intel.com>\n\ncommand is: set vf vlan tag port_id vf_id on|off\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\n---\n app/test-pmd/cmdline.c                      | 103 ++++++++++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |   7 ++\n 2 files changed, 110 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex a860228..2402d1d 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -297,6 +297,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"set vf vlan antispoof (port_id) (vf_id) (on|off)\\n\"\n \t\t\t\"    Set VLAN antispoof for a VF from the PF.\\n\\n\"\n \n+\t\t\t\"set vf vlan tag (port_id) (vf_id) (on|off)\\n\"\n+\t\t\t\"    Set VLAN tag for a VF from the PF.\\n\\n\"\n+\n \t\t\t\"vlan set filter (on|off) (port_id)\\n\"\n \t\t\t\"    Set the VLAN filter on a port.\\n\\n\"\n \n@@ -11847,6 +11850,105 @@ struct cmd_set_vf_broadcast_result {\n \t},\n };\n \n+/* vf vlan tag configuration */\n+\n+/* Common result structure for vf vlan tag */\n+struct cmd_set_vf_vlan_tag_result {\n+\tcmdline_fixed_string_t set;\n+\tcmdline_fixed_string_t vf;\n+\tcmdline_fixed_string_t vlan;\n+\tcmdline_fixed_string_t tag;\n+\tuint8_t port_id;\n+\tuint16_t vf_id;\n+\tcmdline_fixed_string_t on_off;\n+};\n+\n+/* Common CLI fields for vf vlan tag enable disable */\n+cmdline_parse_token_string_t cmd_set_vf_vlan_tag_set =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t set, \"set\");\n+cmdline_parse_token_string_t cmd_set_vf_vlan_tag_vf =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t vf, \"vf\");\n+cmdline_parse_token_string_t cmd_set_vf_vlan_tag_vlan =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t vlan, \"vlan\");\n+cmdline_parse_token_string_t cmd_set_vf_vlan_tag_tag =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t tag, \"tag\");\n+cmdline_parse_token_num_t cmd_set_vf_vlan_tag_port_id =\n+\tTOKEN_NUM_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t port_id, UINT8);\n+cmdline_parse_token_num_t cmd_set_vf_vlan_tag_vf_id =\n+\tTOKEN_NUM_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t vf_id, UINT16);\n+cmdline_parse_token_string_t cmd_set_vf_vlan_tag_on_off =\n+\tTOKEN_STRING_INITIALIZER\n+\t\t(struct cmd_set_vf_vlan_tag_result,\n+\t\t on_off, \"on#off\");\n+\n+static void\n+cmd_set_vf_vlan_tag_parsed(\n+\tvoid *parsed_result,\n+\t__attribute__((unused)) struct cmdline *cl,\n+\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_set_vf_vlan_tag_result *res = parsed_result;\n+\tint ret = -ENOTSUP;\n+\n+\t__rte_unused int is_on = (strcmp(res->on_off, \"on\") == 0) ? 1 : 0;\n+\tstruct rte_eth_dev_info dev_info;\n+\n+\tif (port_id_is_invalid(res->port_id, ENABLED_WARN))\n+\t\treturn;\n+\n+\trte_eth_dev_info_get(res->port_id, &dev_info);\n+\n+#ifdef RTE_LIBRTE_I40E_PMD\n+\tif (strstr(dev_info.driver_name, \"i40e\") != NULL)\n+\t\tret = rte_pmd_i40e_set_vf_vlan_tag(res->port_id,\n+\t\t\t\t\t\t   res->vf_id, is_on);\n+#endif\n+\n+\tswitch (ret) {\n+\tcase 0:\n+\t\tbreak;\n+\tcase -EINVAL:\n+\t\tprintf(\"invalid vf_id %d or is_on %d\\n\", res->vf_id, is_on);\n+\t\tbreak;\n+\tcase -ENODEV:\n+\t\tprintf(\"invalid port_id %d\\n\", res->port_id);\n+\t\tbreak;\n+\tcase -ENOTSUP:\n+\t\tprintf(\"function not implemented\\n\");\n+\t\tbreak;\n+\tdefault:\n+\t\tprintf(\"programming error: (%s)\\n\", strerror(-ret));\n+\t}\n+}\n+\n+cmdline_parse_inst_t cmd_set_vf_vlan_tag = {\n+\t.f = cmd_set_vf_vlan_tag_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set vf vlan tag port_id vf_id on|off\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_vf_vlan_tag_set,\n+\t\t(void *)&cmd_set_vf_vlan_tag_vf,\n+\t\t(void *)&cmd_set_vf_vlan_tag_vlan,\n+\t\t(void *)&cmd_set_vf_vlan_tag_tag,\n+\t\t(void *)&cmd_set_vf_vlan_tag_port_id,\n+\t\t(void *)&cmd_set_vf_vlan_tag_vf_id,\n+\t\t(void *)&cmd_set_vf_vlan_tag_on_off,\n+\t\tNULL,\n+\t},\n+};\n+\n /* ******************************************************************************** */\n \n /* list of instructions */\n@@ -12016,6 +12118,7 @@ struct cmd_set_vf_broadcast_result {\n \t(cmdline_parse_inst_t *)&cmd_set_vf_promisc,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_allmulti,\n \t(cmdline_parse_inst_t *)&cmd_set_vf_broadcast,\n+\t(cmdline_parse_inst_t *)&cmd_set_vf_vlan_tag,\n \tNULL,\n };\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 823db7e..84805af 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -542,6 +542,13 @@ Set VLAN insert for a VF from the PF::\n \n    testpmd> set vf vlan insert (port_id) (vf_id) (vlan_id)\n \n+vlan set tag (for VF)\n+~~~~~~~~~~~~~~~~~~~~~\n+\n+Set VLAN tag for a VF from the PF::\n+\n+   testpmd> set vf vlan tag (port_id) (vf_id) (on|off)\n+\n vlan set antispoof (for VF)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n",
    "prefixes": [
        "dpdk-dev",
        "v9",
        "22/26"
    ]
}