get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7560,
    "url": "https://patches.dpdk.org/api/patches/7560/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1444744652-573-8-git-send-email-jasvinder.singh@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": "<1444744652-573-8-git-send-email-jasvinder.singh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1444744652-573-8-git-send-email-jasvinder.singh@intel.com",
    "date": "2015-10-13T13:57:31",
    "name": "[dpdk-dev,v2,7/8] example/ip_pipeline/pipeline: update flow_classification pipeline",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "48ba6db16db1ea26f42aada0c11a54dcb392d53e",
    "submitter": {
        "id": 285,
        "url": "https://patches.dpdk.org/api/people/285/?format=api",
        "name": "Jasvinder Singh",
        "email": "jasvinder.singh@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1444744652-573-8-git-send-email-jasvinder.singh@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7560/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7560/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 AFBD98E93;\n\tTue, 13 Oct 2015 15:57:42 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id CD44D8DAC\n\tfor <dev@dpdk.org>; Tue, 13 Oct 2015 15:57:36 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 13 Oct 2015 06:57:35 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 13 Oct 2015 06:57:34 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt9DDvYha013295; Tue, 13 Oct 2015 14:57:34 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t9DDvXvm000656;\n\tTue, 13 Oct 2015 14:57:33 +0100",
            "(from jasvinde@localhost)\n\tby sivswdev02.ir.intel.com with  id t9DDvXtm000652;\n\tTue, 13 Oct 2015 14:57:33 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,678,1437462000\"; d=\"scan'208\";a=\"809951026\"",
        "From": "Jasvinder Singh <jasvinder.singh@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 13 Oct 2015 14:57:31 +0100",
        "Message-Id": "<1444744652-573-8-git-send-email-jasvinder.singh@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1444744652-573-1-git-send-email-jasvinder.singh@intel.com>",
        "References": "<B27915DBBA3421428155699D51E4CFE20237F82D@IRSMSX103.ger.corp.intel.com>\n\t<1444744652-573-1-git-send-email-jasvinder.singh@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 7/8] example/ip_pipeline/pipeline: update\n\tflow_classification pipeline",
        "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": "From: Fan Zhang <roy.fan.zhang@intel.com>\n\nThis patch updates the flow_classification pipeline for added key_mask\nparameter in 8/16-byte key hash parameters. The update provides user\noptional key_mask configuration item applying to the packets.\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n .../pipeline/pipeline_flow_classification_be.c     | 56 ++++++++++++++++++++--\n 1 file changed, 52 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c b/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c\nindex 06a648d..e22f96f 100644\n--- a/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c\n+++ b/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c\n@@ -37,6 +37,7 @@\n #include <rte_malloc.h>\n #include <rte_table_hash.h>\n #include <rte_byteorder.h>\n+#include <pipeline.h>\n \n #include \"pipeline_flow_classification_be.h\"\n #include \"hash_func.h\"\n@@ -49,6 +50,7 @@ struct pipeline_flow_classification {\n \tuint32_t key_offset;\n \tuint32_t key_size;\n \tuint32_t hash_offset;\n+\tuint8_t *key_mask;\n } __rte_cache_aligned;\n \n static void *\n@@ -125,8 +127,12 @@ pipeline_fc_parse_args(struct pipeline_flow_classification *p,\n \tuint32_t key_offset_present = 0;\n \tuint32_t key_size_present = 0;\n \tuint32_t hash_offset_present = 0;\n+\tuint32_t key_mask_present = 0;\n \n \tuint32_t i;\n+\tchar *key_mask_str = NULL;\n+\n+\tp->hash_offset = 0;\n \n \tfor (i = 0; i < params->n_args; i++) {\n \t\tchar *arg_name = params->args_name[i];\n@@ -171,6 +177,20 @@ pipeline_fc_parse_args(struct pipeline_flow_classification *p,\n \t\t\tcontinue;\n \t\t}\n \n+\t\t/* key_mask */\n+\t\tif (strcmp(arg_name, \"key_mask\") == 0) {\n+\t\t\tif (key_mask_present)\n+\t\t\t\treturn -1;\n+\n+\t\t\tkey_mask_str = strdup(arg_value);\n+\t\t\tif (key_mask_str == NULL)\n+\t\t\t\treturn -1;\n+\n+\t\t\tkey_mask_present = 1;\n+\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\t/* hash_offset */\n \t\tif (strcmp(arg_name, \"hash_offset\") == 0) {\n \t\t\tif (hash_offset_present)\n@@ -189,10 +209,23 @@ pipeline_fc_parse_args(struct pipeline_flow_classification *p,\n \t/* Check that mandatory arguments are present */\n \tif ((n_flows_present == 0) ||\n \t\t(key_offset_present == 0) ||\n-\t\t(key_size_present == 0) ||\n-\t\t(hash_offset_present == 0))\n+\t\t(key_size_present == 0))\n \t\treturn -1;\n \n+\tif (key_mask_present) {\n+\t\tp->key_mask = rte_malloc(NULL, p->key_size, 0);\n+\t\tif (p->key_mask == NULL)\n+\t\t\treturn -1;\n+\n+\t\tif (parse_hex_string(key_mask_str, p->key_mask, &p->key_size)\n+\t\t\t!= 0) {\n+\t\t\tfree(p->key_mask);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tfree(key_mask_str);\n+\t}\n+\n \treturn 0;\n }\n \n@@ -297,6 +330,7 @@ static void *pipeline_fc_init(struct pipeline_params *params,\n \t\t\t.signature_offset = p_fc->hash_offset,\n \t\t\t.key_offset = p_fc->key_offset,\n \t\t\t.f_hash = hash_func[(p_fc->key_size / 8) - 1],\n+\t\t\t.key_mask = p_fc->key_mask,\n \t\t\t.seed = 0,\n \t\t};\n \n@@ -307,6 +341,7 @@ static void *pipeline_fc_init(struct pipeline_params *params,\n \t\t\t.signature_offset = p_fc->hash_offset,\n \t\t\t.key_offset = p_fc->key_offset,\n \t\t\t.f_hash = hash_func[(p_fc->key_size / 8) - 1],\n+\t\t\t.key_mask = p_fc->key_mask,\n \t\t\t.seed = 0,\n \t\t};\n \n@@ -336,12 +371,25 @@ static void *pipeline_fc_init(struct pipeline_params *params,\n \n \t\tswitch (p_fc->key_size) {\n \t\tcase 8:\n-\t\t\ttable_params.ops = &rte_table_hash_key8_lru_ops;\n+\t\t\tif (p_fc->hash_offset != 0) {\n+\t\t\t\ttable_params.ops =\n+\t\t\t\t\t&rte_table_hash_key8_ext_ops;\n+\t\t\t} else {\n+\t\t\t\ttable_params.ops =\n+\t\t\t\t\t&rte_table_hash_key8_ext_dosig_ops;\n+\t\t\t}\n \t\t\ttable_params.arg_create = &table_hash_key8_params;\n \t\t\tbreak;\n+\t\t\tbreak;\n \n \t\tcase 16:\n-\t\t\ttable_params.ops = &rte_table_hash_key16_ext_ops;\n+\t\t\tif (p_fc->hash_offset != 0) {\n+\t\t\t\ttable_params.ops =\n+\t\t\t\t\t&rte_table_hash_key16_ext_ops;\n+\t\t\t} else {\n+\t\t\t\ttable_params.ops =\n+\t\t\t\t\t&rte_table_hash_key16_ext_dosig_ops;\n+\t\t\t}\n \t\t\ttable_params.arg_create = &table_hash_key16_params;\n \t\t\tbreak;\n \n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "7/8"
    ]
}