get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 5443,
    "url": "http://patches.dpdk.org/api/patches/5443/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1434426227-5477-4-git-send-email-jingjing.wu@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": "<1434426227-5477-4-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1434426227-5477-4-git-send-email-jingjing.wu@intel.com",
    "date": "2015-06-16T03:43:46",
    "name": "[dpdk-dev,v2,3/4] testpmd: extend commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fe3590e5f6151c36b05deb74920e64b8f5f7a703",
    "submitter": {
        "id": 47,
        "url": "http://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1434426227-5477-4-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/5443/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/5443/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 6E65DC33C;\n\tTue, 16 Jun 2015 05:44:05 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 05C77C32A\n\tfor <dev@dpdk.org>; Tue, 16 Jun 2015 05:44:02 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 15 Jun 2015 20:44:02 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 15 Jun 2015 20:44:01 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t5G3hx7P027036;\n\tTue, 16 Jun 2015 11:43:59 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t5G3huNL005756; Tue, 16 Jun 2015 11:43:58 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t5G3huGZ005751; \n\tTue, 16 Jun 2015 11:43:56 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,623,1427785200\"; d=\"scan'208\";a=\"728088885\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 16 Jun 2015 11:43:46 +0800",
        "Message-Id": "<1434426227-5477-4-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1434426227-5477-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1431315990-3067-1-git-send-email-jingjing.wu@intel.com>\n\t<1434426227-5477-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/4] testpmd: extend commands",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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 extends flow director commands to support l2_payload flow type.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n app/test-pmd/cmdline.c | 48 +++++++++++++++++++++++++++++++++++++++++++++---\n 1 file changed, 45 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex f01db2a..9659464 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -652,6 +652,12 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\" queue (queue_id) fd_id (fd_id_value)\\n\"\n \t\t\t\"    Add/Del a SCTP type flow director filter.\\n\\n\"\n \n+\t\t\t\"flow_director_filter (port_id) (add|del|update)\"\n+\t\t\t\" flow l2_payload ether (ethertype)\"\n+\t\t\t\" flexbytes (flexbytes_value) (drop|fwd)\"\n+\t\t\t\" queue (queue_id) fd_id (fd_id_value)\\n\"\n+\t\t\t\"    Add/Del a l2 payload type flow director filter.\\n\\n\"\n+\n \t\t\t\"flush_flow_director (port_id)\\n\"\n \t\t\t\"    Flush all flow director entries of a device.\\n\\n\"\n \n@@ -662,7 +668,7 @@ static void cmd_help_long_parsed(void *parsed_result,\n \n \t\t\t\"flow_director_flex_mask (port_id)\"\n \t\t\t\" flow (none|ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|\"\n-\t\t\t\"ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|all)\"\n+\t\t\t\"ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|l2_payload|all)\"\n \t\t\t\" (mask)\\n\"\n \t\t\t\"    Configure mask of flex payload.\\n\\n\"\n \n@@ -7653,6 +7659,8 @@ struct cmd_flow_director_result {\n \tcmdline_fixed_string_t ops;\n \tcmdline_fixed_string_t flow;\n \tcmdline_fixed_string_t flow_type;\n+\tcmdline_fixed_string_t ether;\n+\tuint16_t ether_type;\n \tcmdline_fixed_string_t src;\n \tcmdline_ipaddr_t ip_src;\n \tuint16_t port_src;\n@@ -7837,6 +7845,10 @@ cmd_flow_director_filter_parsed(void *parsed_result,\n \t\tentry.input.flow.sctp6_flow.verify_tag =\n \t\t\t\trte_cpu_to_be_32(res->verify_tag_value);\n \t\tbreak;\n+\tcase RTE_ETH_FLOW_L2_PAYLOAD:\n+\t\tentry.input.flow.l2_flow.ether_type =\n+\t\t\trte_cpu_to_be_16(res->ether_type);\n+\t\tbreak;\n \tdefault:\n \t\tprintf(\"invalid parameter.\\n\");\n \t\treturn;\n@@ -7885,7 +7897,13 @@ cmdline_parse_token_string_t cmd_flow_director_flow =\n cmdline_parse_token_string_t cmd_flow_director_flow_type =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n \t\tflow_type, \"ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#\"\n-\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp\");\n+\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#l2_payload\");\n+cmdline_parse_token_string_t cmd_flow_director_ether =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t ether, \"ether\");\n+cmdline_parse_token_num_t cmd_flow_director_ether_type =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      ether_type, UINT16);\n cmdline_parse_token_string_t cmd_flow_director_src =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n \t\t\t\t src, \"src\");\n@@ -8025,6 +8043,29 @@ cmdline_parse_inst_t cmd_add_del_sctp_flow_director = {\n \t},\n };\n \n+cmdline_parse_inst_t cmd_add_del_l2_flow_director = {\n+\t.f = cmd_flow_director_filter_parsed,\n+\t.data = NULL,\n+\t.help_str = \"add or delete a L2 flow director entry on NIC\",\n+\t.tokens = {\n+\t\t(void *)&cmd_flow_director_filter,\n+\t\t(void *)&cmd_flow_director_port_id,\n+\t\t(void *)&cmd_flow_director_ops,\n+\t\t(void *)&cmd_flow_director_flow,\n+\t\t(void *)&cmd_flow_director_flow_type,\n+\t\t(void *)&cmd_flow_director_ether,\n+\t\t(void *)&cmd_flow_director_ether_type,\n+\t\t(void *)&cmd_flow_director_flexbytes,\n+\t\t(void *)&cmd_flow_director_flexbytes_value,\n+\t\t(void *)&cmd_flow_director_drop,\n+\t\t(void *)&cmd_flow_director_queue,\n+\t\t(void *)&cmd_flow_director_queue_id,\n+\t\t(void *)&cmd_flow_director_fd_id,\n+\t\t(void *)&cmd_flow_director_fd_id_value,\n+\t\tNULL,\n+\t},\n+};\n+\n struct cmd_flush_flow_director_result {\n \tcmdline_fixed_string_t flush_flow_director;\n \tuint8_t port_id;\n@@ -8278,7 +8319,7 @@ cmdline_parse_token_string_t cmd_flow_director_flexmask_flow =\n cmdline_parse_token_string_t cmd_flow_director_flexmask_flow_type =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,\n \t\tflow_type, \"none#ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#\"\n-\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#all\");\n+\t\t\"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#l2_payload#all\");\n cmdline_parse_token_string_t cmd_flow_director_flexmask_mask =\n \tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,\n \t\t\t\t mask, NULL);\n@@ -8854,6 +8895,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_add_del_ip_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_add_del_udp_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_add_del_sctp_flow_director,\n+\t(cmdline_parse_inst_t *)&cmd_add_del_l2_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_flush_flow_director,\n \t(cmdline_parse_inst_t *)&cmd_set_flow_director_mask,\n \t(cmdline_parse_inst_t *)&cmd_set_flow_director_flex_mask,\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "3/4"
    ]
}