get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7116,
    "url": "https://patches.dpdk.org/api/patches/7116/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1442906770-18805-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": "<1442906770-18805-3-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1442906770-18805-3-git-send-email-helin.zhang@intel.com",
    "date": "2015-09-22T07:26:10",
    "name": "[dpdk-dev,v2,2/2] app/testpmd: add test commands for RSS granularity",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7ef2370fd1aa87a81abd12e1e7917a14e9b0b31e",
    "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/1442906770-18805-3-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7116/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7116/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 DD3388E5D;\n\tTue, 22 Sep 2015 09:26:28 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 320A38DAC\n\tfor <dev@dpdk.org>; Tue, 22 Sep 2015 09:26:26 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP; 22 Sep 2015 00:26:26 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 22 Sep 2015 00:26:24 -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 t8M7QKtP008115;\n\tTue, 22 Sep 2015 15:26:20 +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 t8M7QGsQ018853; Tue, 22 Sep 2015 15:26:18 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8M7QGFC018849; \n\tTue, 22 Sep 2015 15:26:16 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,571,1437462000\"; d=\"scan'208\";a=\"810216216\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 22 Sep 2015 15:26:10 +0800",
        "Message-Id": "<1442906770-18805-3-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1442906770-18805-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1442903547-18198-1-git-send-email-helin.zhang@intel.com>\n\t<1442906770-18805-1-git-send-email-helin.zhang@intel.com>",
        "Cc": "yulong.pei@intel.com",
        "Subject": "[dpdk-dev] [PATCH v2 2/2] app/testpmd: add test commands for RSS\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 clearing input set, or setting\nwith new 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 | 106 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 106 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0f8f48f..80098e6 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -8851,6 +8851,111 @@ cmdline_parse_inst_t cmd_set_hash_global_config = {\n \t},\n };\n \n+/**/\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 enable;\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{\"src-ipv4\", RTE_ETH_INPUT_SET_L3_SRC_IP4},\n+\t\t{\"dst-ipv4\", RTE_ETH_INPUT_SET_L3_DST_IP4},\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{\"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{\"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{\"all\", RTE_ETH_INPUT_SET_ALL},\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->enable, \"enable\"))\n+\t\tinfo.info.input_set_conf.enable = 1;\n+\telse\n+\t\tinfo.info.input_set_conf.enable = 0;\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\"src-ipv4#dst-ipv4#src-ipv6#dst-ipv6#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#fld-1st#fld-2nd#fld-3rd#fld-4th#\"\n+\t\t\"fld-5th#fld-6th#fld-7th#fld-8th#all\");\n+cmdline_parse_token_string_t cmd_set_hash_input_set_enable =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_hash_input_set_result,\n+\t\tenable, \"enable#disable\");\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 = \"ssss\",\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_enable,\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 +9138,7 @@ 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_mcast_addr,\n \tNULL,\n };\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "2/2"
    ]
}