get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7756,
    "url": "https://patches.dpdk.org/api/patches/7756/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445312574-27266-3-git-send-email-helin.zhang@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": "<1445312574-27266-3-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1445312574-27266-3-git-send-email-helin.zhang@intel.com",
    "date": "2015-10-20T03:42:54",
    "name": "[dpdk-dev,v4,2/2] app/testpmd: add test commands for RSS/FD granularity",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cb0c682fe6f13f34ae065cdcc1001dfca6eea072",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445312574-27266-3-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7756/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7756/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 C94D58E81;\n\tTue, 20 Oct 2015 05:43:09 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 6955E8E62\n\tfor <dev@dpdk.org>; Tue, 20 Oct 2015 05:43:07 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP; 19 Oct 2015 20:43:06 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 19 Oct 2015 20:43:05 -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 t9K3h3XR004123;\n\tTue, 20 Oct 2015 11:43:03 +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 t9K3h0Bg027443; Tue, 20 Oct 2015 11:43:02 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9K3h039027411; \n\tTue, 20 Oct 2015 11:43:00 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,705,1437462000\"; d=\"scan'208\";a=\"797586815\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 20 Oct 2015 11:42:54 +0800",
        "Message-Id": "<1445312574-27266-3-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1445312574-27266-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1443078497-20602-1-git-send-email-helin.zhang@intel.com>\n\t<1445312574-27266-1-git-send-email-helin.zhang@intel.com>",
        "Cc": "yulong.pei@intel.com",
        "Subject": "[dpdk-dev] [PATCH v4 2/2] app/testpmd: add test commands for RSS/FD\n\tgranularity",
        "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": "Test commands are added to support selecting input set, or adding\nnew input set per different pctype.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nSigned-off-by: Andrey Chilikin <andrey.chilikin@intel.com>\n---\n app/test-pmd/cmdline.c | 196 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 196 insertions(+)\n\nv3 changes:\nSupport selecting more input set fields.\n\nv4 changes:\nRemoved operation of 'delete'.\nAdded test commands for FD granularity.",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0f8f48f..a71b200 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -8851,6 +8851,200 @@ cmdline_parse_inst_t cmd_set_hash_global_config = {\n \t},\n };\n \n+/* Set hash input set */\n+struct cmd_set_hash_input_set_result {\n+\tcmdline_fixed_string_t set_hash_input_set;\n+\tuint8_t port_id;\n+\tcmdline_fixed_string_t flow_type;\n+\tcmdline_fixed_string_t inset_field;\n+\tcmdline_fixed_string_t select;\n+};\n+\n+static enum rte_eth_input_set_field\n+str2inset(char *string)\n+{\n+\tuint16_t i;\n+\n+\tstatic const struct {\n+\t\tchar str[32];\n+\t\tenum rte_eth_input_set_field inset;\n+\t} inset_table[] = {\n+\t\t{\"ovlan\", RTE_ETH_INPUT_SET_L2_OUTER_VLAN},\n+\t\t{\"ivlan\", RTE_ETH_INPUT_SET_L2_INNER_VLAN},\n+\t\t{\"src-ipv4\", RTE_ETH_INPUT_SET_L3_SRC_IP4},\n+\t\t{\"dst-ipv4\", RTE_ETH_INPUT_SET_L3_DST_IP4},\n+\t\t{\"ipv4-tos\", RTE_ETH_INPUT_SET_L3_IP4_TOS},\n+\t\t{\"ipv4-proto\", RTE_ETH_INPUT_SET_L3_IP4_PROTO},\n+\t\t{\"src-ipv6\", RTE_ETH_INPUT_SET_L3_SRC_IP6},\n+\t\t{\"dst-ipv6\", RTE_ETH_INPUT_SET_L3_DST_IP6},\n+\t\t{\"ipv6-tc\", RTE_ETH_INPUT_SET_L3_IP6_TC},\n+\t\t{\"ipv6-next-header\", RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER},\n+\t\t{\"udp-src-port\", RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT},\n+\t\t{\"udp-dst-port\", RTE_ETH_INPUT_SET_L4_UDP_DST_PORT},\n+\t\t{\"tcp-src-port\", RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT},\n+\t\t{\"tcp-dst-port\", RTE_ETH_INPUT_SET_L4_TCP_DST_PORT},\n+\t\t{\"sctp-src-port\", RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT},\n+\t\t{\"sctp-dst-port\", RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT},\n+\t\t{\"sctp-veri-tag\", RTE_ETH_INPUT_SET_L4_SCTP_VERIFICATION_TAG},\n+\t\t{\"udp-key\", RTE_ETH_INPUT_SET_TUNNEL_L4_UDP_KEY},\n+\t\t{\"gre-key\", RTE_ETH_INPUT_SET_TUNNEL_GRE_KEY},\n+\t\t{\"fld-1st\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_1ST_WORD},\n+\t\t{\"fld-2nd\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_2ND_WORD},\n+\t\t{\"fld-3rd\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_3RD_WORD},\n+\t\t{\"fld-4th\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_4TH_WORD},\n+\t\t{\"fld-5th\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_5TH_WORD},\n+\t\t{\"fld-6th\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_6TH_WORD},\n+\t\t{\"fld-7th\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_7TH_WORD},\n+\t\t{\"fld-8th\", RTE_ETH_INPUT_SET_FLEX_PAYLOAD_8TH_WORD},\n+\t\t{\"none\", RTE_ETH_INPUT_SET_NONE},\n+\t};\n+\n+\tfor (i = 0; i < RTE_DIM(inset_table); i++) {\n+\t\tif (!strcmp(string, inset_table[i].str))\n+\t\t\treturn inset_table[i].inset;\n+\t}\n+\n+\treturn RTE_ETH_INPUT_SET_UNKNOWN;\n+}\n+\n+static void\n+cmd_set_hash_input_set_parsed(void *parsed_result,\n+\t\t\t      __rte_unused struct cmdline *cl,\n+\t\t\t      __rte_unused void *data)\n+{\n+\tstruct cmd_set_hash_input_set_result *res = parsed_result;\n+\tstruct rte_eth_hash_filter_info info;\n+\n+\tmemset(&info, 0, sizeof(info));\n+\tinfo.info_type = RTE_ETH_HASH_FILTER_INPUT_SET_SELECT;\n+\tinfo.info.input_set_conf.flow_type = str2flowtype(res->flow_type);\n+\tinfo.info.input_set_conf.field[0] = str2inset(res->inset_field);\n+\tinfo.info.input_set_conf.inset_size = 1;\n+\tif (!strcmp(res->select, \"select\"))\n+\t\tinfo.info.input_set_conf.op = RTE_ETH_INPUT_SET_SELECT;\n+\telse if (!strcmp(res->select, \"add\"))\n+\t\tinfo.info.input_set_conf.op = RTE_ETH_INPUT_SET_ADD;\n+\trte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_HASH,\n+\t\t\t\tRTE_ETH_FILTER_SET, &info);\n+}\n+\n+cmdline_parse_token_string_t cmd_set_hash_input_set_cmd =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tset_hash_input_set, \"set_hash_input_set\");\n+cmdline_parse_token_num_t cmd_set_hash_input_set_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tport_id, UINT8);\n+cmdline_parse_token_string_t cmd_set_hash_input_set_flow_type =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tflow_type,\n+\t\t\"ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#ipv4-other#ipv6#\"\n+\t\t\"ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#ipv6-other#l2_payload\");\n+cmdline_parse_token_string_t cmd_set_hash_input_set_field =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tinset_field,\n+\t\t\"ovlan#ivlan#src-ipv4#dst-ipv4#src-ipv6#dst-ipv6#\"\n+\t\t\"ipv4-tos#ipv4-proto#ipv6-tc#ipv6-next-header#udp-src-port#\"\n+\t\t\"udp-dst-port#tcp-src-port#tcp-dst-port#sctp-src-port#\"\n+\t\t\"sctp-dst-port#sctp-veri-tag#udp-key#gre-key#fld-1st#\"\n+\t\t\"fld-2nd#fld-3rd#fld-4th#fld-5th#fld-6th#fld-7th#\"\n+\t\t\"fld-8th#none\");\n+cmdline_parse_token_string_t cmd_set_hash_input_set_select =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tselect, \"select#add\");\n+\n+cmdline_parse_inst_t cmd_set_hash_input_set = {\n+\t.f = cmd_set_hash_input_set_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set_hash_input_set <port_id> \"\n+\t\"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag|\"\n+\t\"ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload \"\n+\t\"ovlan|ivlan|src-ipv4|dst-ipv4|src-ipv6|dst-ipv6|ipv4-tos|ipv4-proto|\"\n+\t\"ipv6-tc|ipv6-next-header|udp-src-port|udp-dst-port|tcp-src-port|\"\n+\t\"tcp-dst-port|sctp-src-port|sctp-dst-port|sctp-veri-tag|udp-key|\"\n+\t\"gre-key|fld-1st|fld-2nd|fld-3rd|fld-4th|fld-5th|fld-6th|\"\n+\t\"fld-7th|fld-8th|none select|add\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_hash_input_set_cmd,\n+\t\t(void *)&cmd_set_hash_input_set_port_id,\n+\t\t(void *)&cmd_set_hash_input_set_flow_type,\n+\t\t(void *)&cmd_set_hash_input_set_field,\n+\t\t(void *)&cmd_set_hash_input_set_select,\n+\t\tNULL,\n+\t},\n+};\n+\n+/* Set flow director input set */\n+struct cmd_set_fdir_input_set_result {\n+\tcmdline_fixed_string_t set_fdir_input_set;\n+\tuint8_t port_id;\n+\tcmdline_fixed_string_t flow_type;\n+\tcmdline_fixed_string_t inset_field;\n+\tcmdline_fixed_string_t select;\n+};\n+\n+static void\n+cmd_set_fdir_input_set_parsed(void *parsed_result,\n+\t__rte_unused struct cmdline *cl,\n+\t__rte_unused void *data)\n+{\n+\tstruct cmd_set_fdir_input_set_result *res = parsed_result;\n+\tstruct rte_eth_fdir_filter_info info;\n+\n+\tmemset(&info, 0, sizeof(info));\n+\tinfo.info_type = RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT;\n+\tinfo.info.input_set_conf.flow_type = str2flowtype(res->flow_type);\n+\tinfo.info.input_set_conf.field[0] = str2inset(res->inset_field);\n+\tinfo.info.input_set_conf.inset_size = 1;\n+\tif (!strcmp(res->select, \"select\"))\n+\t\tinfo.info.input_set_conf.op = RTE_ETH_INPUT_SET_SELECT;\n+\telse if (!strcmp(res->select, \"add\"))\n+\t\tinfo.info.input_set_conf.op = RTE_ETH_INPUT_SET_ADD;\n+\trte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,\n+\t\tRTE_ETH_FILTER_SET, &info);\n+}\n+\n+cmdline_parse_token_string_t cmd_set_fdir_input_set_cmd =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_fdir_input_set_result,\n+\tset_fdir_input_set, \"set_fdir_input_set\");\n+cmdline_parse_token_num_t cmd_set_fdir_input_set_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_set_fdir_input_set_result,\n+\tport_id, UINT8);\n+cmdline_parse_token_string_t cmd_set_fdir_input_set_flow_type =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_fdir_input_set_result,\n+\tflow_type,\n+\t\"ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#ipv4-other#ipv6#\"\n+\t\"ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#ipv6-other#l2_payload\");\n+cmdline_parse_token_string_t cmd_set_fdir_input_set_field =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_fdir_input_set_result,\n+\tinset_field,\n+\t\"src-ipv4#dst-ipv4#src-ipv6#dst-ipv6#udp-src-port#udp-dst-port#\"\n+\t\"tcp-src-port#tcp-dst-port#sctp-src-port#sctp-dst-port#\"\n+\t\"sctp-veri-tag#fld-1st#fld-2nd#fld-3rd#fld-4th#fld-5th#fld-6th#\"\n+\t\"fld-7th#fld-8th#none\");\n+cmdline_parse_token_string_t cmd_set_fdir_input_set_select =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_fdir_input_set_result,\n+\tselect, \"select#add\");\n+\n+cmdline_parse_inst_t cmd_set_fdir_input_set = {\n+\t.f = cmd_set_fdir_input_set_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set_fdir_input_set <port_id> \"\n+\t\"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag|\"\n+\t\"ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload \"\n+\t\"src-ipv4|dst-ipv4|src-ipv6|dst-ipv6|udp-src-port|udp-dst-port|\"\n+\t\"tcp-src-port|tcp-dst-port|sctp-src-port|sctp-dst-port|sctp-veri-tag|\"\n+\t\"fld-1st|fld-2nd|fld-3rd|fld-4th|fld-5th|fld-6th|\"\n+\t\"fld-7th|fld-8th|none select|add\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_fdir_input_set_cmd,\n+\t\t(void *)&cmd_set_fdir_input_set_port_id,\n+\t\t(void *)&cmd_set_fdir_input_set_flow_type,\n+\t\t(void *)&cmd_set_fdir_input_set_field,\n+\t\t(void *)&cmd_set_fdir_input_set_select,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** ADD/REMOVE A MULTICAST MAC ADDRESS TO/FROM A PORT *** */\n struct cmd_mcast_addr_result {\n \tcmdline_fixed_string_t mcast_addr_cmd;\n@@ -9033,6 +9227,8 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_set_sym_hash_ena_per_port,\n \t(cmdline_parse_inst_t *)&cmd_get_hash_global_config,\n \t(cmdline_parse_inst_t *)&cmd_set_hash_global_config,\n+\t(cmdline_parse_inst_t *)&cmd_set_hash_input_set,\n+\t(cmdline_parse_inst_t *)&cmd_set_fdir_input_set,\n \t(cmdline_parse_inst_t *)&cmd_mcast_addr,\n \tNULL,\n };\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "2/2"
    ]
}