get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50755,
    "url": "http://patches.dpdk.org/api/patches/50755/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190302104251.32565-10-hyonkim@cisco.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": "<20190302104251.32565-10-hyonkim@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190302104251.32565-10-hyonkim@cisco.com",
    "date": "2019-03-02T10:42:47",
    "name": "[v2,09/13] net/enic: enable limited support for RAW flow item",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "05fbd8ba12dc5f04ab681a5f56fb639abf2f5cda",
    "submitter": {
        "id": 948,
        "url": "http://patches.dpdk.org/api/people/948/?format=api",
        "name": "Hyong Youb Kim (hyonkim)",
        "email": "hyonkim@cisco.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190302104251.32565-10-hyonkim@cisco.com/mbox/",
    "series": [
        {
            "id": 3613,
            "url": "http://patches.dpdk.org/api/series/3613/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3613",
            "date": "2019-03-02T10:42:38",
            "name": "net/enic: 19.05 updates",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/3613/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50755/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/50755/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3343037B4;\n\tSat,  2 Mar 2019 11:45:24 +0100 (CET)",
            "from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72])\n\tby dpdk.org (Postfix) with ESMTP id A23381E34\n\tfor <dev@dpdk.org>; Sat,  2 Mar 2019 11:45:22 +0100 (CET)",
            "from alln-core-7.cisco.com ([173.36.13.140])\n\tby rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Mar 2019 10:45:21 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby alln-core-7.cisco.com (8.15.2/8.15.2) with ESMTP id x22AjLEs029491;\n\tSat, 2 Mar 2019 10:45:21 GMT",
            "by cisco.com (Postfix, from userid 508933)\n\tid 64B5B20F2001; Sat,  2 Mar 2019 02:45:21 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=5579; q=dns/txt; s=iport;\n\tt=1551523522; x=1552733122;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=EgMl45Jrf9f1/NVWn7g1rgUqGvCpxCQNgxZImaDlcJk=;\n\tb=eg/sK1CzHzfl+nMAHmuR/ZmACmvLbiUsivQgGf89YJrBK9OUiGdC8OnV\n\tjeMPm+ieZ6zE9grXjl/RYwAfVQ7N9NsF4fxczTbYbl6rXlroH6BReCeIi\n\td/CXlnGbT5N8kcSO2G7EEg6SS2g+NA2xueHLJBuGU2Xy2J8BuI3W4KNOQ s=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,431,1544486400\"; d=\"scan'208\";a=\"527406271\"",
        "From": "Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "Cc": "dev@dpdk.org, John Daley <johndale@cisco.com>,\n\tHyong Youb Kim <hyonkim@cisco.com>",
        "Date": "Sat,  2 Mar 2019 02:42:47 -0800",
        "Message-Id": "<20190302104251.32565-10-hyonkim@cisco.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "In-Reply-To": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "References": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "X-Outbound-SMTP-Client": "10.193.184.48, savbu-usnic-a.cisco.com",
        "X-Outbound-Node": "alln-core-7.cisco.com",
        "Subject": "[dpdk-dev] [PATCH v2 09/13] net/enic: enable limited support for\n\tRAW flow item",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Some apps like VPP use a raw item to match UDP tunnel headers like\nVXLAN or GENEVE. The NIC hardware supports such usage via L5 match,\nwhich does pattern match on packet data immediately following the\nouter L4 header. Accept raw items for these limited use cases.\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\n---\n doc/guides/nics/enic.rst               |  3 +-\n doc/guides/rel_notes/release_19_05.rst |  1 +\n drivers/net/enic/enic_flow.c           | 65 ++++++++++++++++++++++++++++++++++\n 3 files changed, 68 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst\nindex 526e58ce9..c1415dc0d 100644\n--- a/doc/guides/nics/enic.rst\n+++ b/doc/guides/nics/enic.rst\n@@ -255,7 +255,7 @@ Generic Flow API is supported. The baseline support is:\n - **1300 and later series VICS with advanced filters enabled**\n \n   - Attributes: ingress\n-  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, inner eth, ipv4, ipv6, udp, tcp\n+  - Items: eth, ipv4, ipv6, udp, tcp, vxlan, raw, inner eth, ipv4, ipv6, udp, tcp\n   - Actions: queue, mark, drop, flag, rss, passthru, and void\n   - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported\n   - In total, up to 64 bytes of mask is allowed across all headers\n@@ -455,6 +455,7 @@ PKT_RX_VLAN_STRIPPED mbuf flags would not be set. This mode is enabled with the\n     to supporting MARK + RSS and PASSTHRU + MARK to allow the application to mark\n     packets and then receive them normally. These require 1400 series VIC adapters\n     and latest firmware.\n+  - RAW items are limited to matching UDP tunnel headers like VXLAN.\n \n - **Statistics**\n \ndiff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst\nindex c8c12c47a..e5f5c0e25 100644\n--- a/doc/guides/rel_notes/release_19_05.rst\n+++ b/doc/guides/rel_notes/release_19_05.rst\n@@ -79,6 +79,7 @@ New Features\n \n * **Updated the enic driver.**\n \n+  * Added limited support for RAW.\n   * Added limited support for RSS.\n   * Added limited support for PASSTHRU.\n \ndiff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c\nindex fda641b6f..ffc6ce1da 100644\n--- a/drivers/net/enic/enic_flow.c\n+++ b/drivers/net/enic/enic_flow.c\n@@ -77,6 +77,7 @@ struct enic_action_cap {\n static enic_copy_item_fn enic_copy_item_ipv4_v1;\n static enic_copy_item_fn enic_copy_item_udp_v1;\n static enic_copy_item_fn enic_copy_item_tcp_v1;\n+static enic_copy_item_fn enic_copy_item_raw_v2;\n static enic_copy_item_fn enic_copy_item_eth_v2;\n static enic_copy_item_fn enic_copy_item_vlan_v2;\n static enic_copy_item_fn enic_copy_item_ipv4_v2;\n@@ -123,6 +124,14 @@ static const struct enic_items enic_items_v1[] = {\n  * that layer 3 must be specified.\n  */\n static const struct enic_items enic_items_v2[] = {\n+\t[RTE_FLOW_ITEM_TYPE_RAW] = {\n+\t\t.copy_item = enic_copy_item_raw_v2,\n+\t\t.valid_start_item = 0,\n+\t\t.prev_items = (const enum rte_flow_item_type[]) {\n+\t\t\t       RTE_FLOW_ITEM_TYPE_UDP,\n+\t\t\t       RTE_FLOW_ITEM_TYPE_END,\n+\t\t},\n+\t},\n \t[RTE_FLOW_ITEM_TYPE_ETH] = {\n \t\t.copy_item = enic_copy_item_eth_v2,\n \t\t.valid_start_item = 1,\n@@ -196,6 +205,14 @@ static const struct enic_items enic_items_v2[] = {\n \n /** NICs with Advanced filters enabled */\n static const struct enic_items enic_items_v3[] = {\n+\t[RTE_FLOW_ITEM_TYPE_RAW] = {\n+\t\t.copy_item = enic_copy_item_raw_v2,\n+\t\t.valid_start_item = 0,\n+\t\t.prev_items = (const enum rte_flow_item_type[]) {\n+\t\t\t       RTE_FLOW_ITEM_TYPE_UDP,\n+\t\t\t       RTE_FLOW_ITEM_TYPE_END,\n+\t\t},\n+\t},\n \t[RTE_FLOW_ITEM_TYPE_ETH] = {\n \t\t.copy_item = enic_copy_item_eth_v2,\n \t\t.valid_start_item = 1,\n@@ -835,6 +852,54 @@ enic_copy_item_vxlan_v2(struct copy_item_args *arg)\n \treturn 0;\n }\n \n+/*\n+ * Copy raw item into version 2 NIC filter. Currently, raw pattern match is\n+ * very limited. It is intended for matching UDP tunnel header (e.g. vxlan\n+ * or geneve).\n+ */\n+static int\n+enic_copy_item_raw_v2(struct copy_item_args *arg)\n+{\n+\tconst struct rte_flow_item *item = arg->item;\n+\tstruct filter_v2 *enic_filter = arg->filter;\n+\tuint8_t *inner_ofst = arg->inner_ofst;\n+\tconst struct rte_flow_item_raw *spec = item->spec;\n+\tconst struct rte_flow_item_raw *mask = item->mask;\n+\tstruct filter_generic_1 *gp = &enic_filter->u.generic_1;\n+\n+\tFLOW_TRACE();\n+\n+\t/* Cannot be used for inner packet */\n+\tif (*inner_ofst)\n+\t\treturn EINVAL;\n+\t/* Need both spec and mask */\n+\tif (!spec || !mask)\n+\t\treturn EINVAL;\n+\t/* Only supports relative with offset 0 */\n+\tif (!spec->relative || spec->offset != 0 || spec->search || spec->limit)\n+\t\treturn EINVAL;\n+\t/* Need non-null pattern that fits within the NIC's filter pattern */\n+\tif (spec->length == 0 || spec->length > FILTER_GENERIC_1_KEY_LEN ||\n+\t    !spec->pattern || !mask->pattern)\n+\t\treturn EINVAL;\n+\t/*\n+\t * Mask fields, including length, are often set to zero. Assume that\n+\t * means \"same as spec\" to avoid breaking existing apps. If length\n+\t * is not zero, then it should be >= spec length.\n+\t *\n+\t * No more pattern follows this, so append to the L4 layer instead of\n+\t * L5 to work with both recent and older VICs.\n+\t */\n+\tif (mask->length != 0 && mask->length < spec->length)\n+\t\treturn EINVAL;\n+\tmemcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct udp_hdr),\n+\t       mask->pattern, spec->length);\n+\tmemcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct udp_hdr),\n+\t       spec->pattern, spec->length);\n+\n+\treturn 0;\n+}\n+\n /**\n  * Return 1 if current item is valid on top of the previous one.\n  *\n",
    "prefixes": [
        "v2",
        "09/13"
    ]
}