get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21143,
    "url": "https://patches.dpdk.org/api/patches/21143/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1488470591-5853-9-git-send-email-arybchenko@solarflare.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": "<1488470591-5853-9-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1488470591-5853-9-git-send-email-arybchenko@solarflare.com",
    "date": "2017-03-02T16:03:08",
    "name": "[dpdk-dev,08/11] net/sfc: add IPV6 in flow API filters support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "0cd011efc52f7c80177726ebf1ed2c995ebf4cc9",
    "submitter": {
        "id": 607,
        "url": "https://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1488470591-5853-9-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/21143/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/21143/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 11845F950;\n\tThu,  2 Mar 2017 17:04:25 +0100 (CET)",
            "from nbfkord-smmo01.seg.att.com (nbfkord-smmo01.seg.att.com\n\t[209.65.160.76]) by dpdk.org (Postfix) with ESMTP id EA89B69C3\n\tfor <dev@dpdk.org>; Thu,  2 Mar 2017 17:03:54 +0100 (CET)",
            "from unknown [12.187.104.26] (EHLO nbfkord-smmo01.seg.att.com)\n\tby nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id\n\tb6248b85.2b94d1401940.805640.00-2487.2324257.nbfkord-smmo01.seg.att.com\n\t(envelope-from <arybchenko@solarflare.com>); \n\tThu, 02 Mar 2017 16:03:55 +0000 (UTC)",
            "from unknown [12.187.104.26]\n\tby nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-7) with SMTP id\n\t76248b85.0.805630.00-2340.2324240.nbfkord-smmo01.seg.att.com\n\t(envelope-from <arybchenko@solarflare.com>); \n\tThu, 02 Mar 2017 16:03:53 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1044.25; Thu, 2 Mar 2017 08:03:41 -0800",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1044.25 via Frontend Transport; Thu, 2 Mar 2017 08:03:41 -0800",
            "from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com\n\t[10.17.10.10])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tv22G3eId007967; Thu, 2 Mar 2017 16:03:40 GMT",
            "from uklogin.uk.solarflarecom.com (localhost.localdomain\n\t[127.0.0.1])\n\tby uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tv22G3dWr005942; Thu, 2 Mar 2017 16:03:39 GMT"
        ],
        "X-MXL-Hash": [
            "58b8426b1ba3fd8a-473fedf242ac1daa1826a3d690abf4e82608cdb9",
            "58b842696c05c7a7-6e97c56df0dcc9dad5a37504222aab967ba85038"
        ],
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Roman Zhukov <Roman.Zhukov@oktetlabs.ru>",
        "Date": "Thu, 2 Mar 2017 16:03:08 +0000",
        "Message-ID": "<1488470591-5853-9-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.2.3",
        "In-Reply-To": "<1488470591-5853-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1488470591-5853-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-AnalysisOut": [
            "[v=2.1 cv=LaQ6n2ri c=1 sm=1 tr=0 a=8BlWFWvVlq5taO8ncb8nKg==]",
            "[:17 a=6Iz7jQTuP9IA:10 a=pK7X0mNQAAAA:8 a=zRKbQ67AAAAA:8 a=]",
            "[-_Nxld-aaMjgGaA21ikA:9 a=5HA-qpC1VU4iIGLgRoNS:22 a=PA03WX8]",
            "[tBzeizutn5_OT:22]"
        ],
        "X-Spam": "[F=0.4683542547; CM=0.500; S=0.468(2015072901)]",
        "X-MAIL-FROM": "<arybchenko@solarflare.com>",
        "X-SOURCE-IP": "[12.187.104.26]",
        "Subject": "[dpdk-dev] [PATCH 08/11] net/sfc: add IPV6 in flow API filters\n\tsupport",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>\n\nExact match of IP protocol, source and destination\naddresses is supported by parser.\nEtherType match is enforced to IPv6 EtherType.\n\nSigned-off-by: Roman Zhukov <Roman.Zhukov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andrew Lee <alee@solarflare.com>\n---\n doc/guides/nics/sfc_efx.rst |   3 ++\n drivers/net/sfc/sfc_flow.c  | 100 ++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 103 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst\nindex 12ac308..a4ea162 100644\n--- a/doc/guides/nics/sfc_efx.rst\n+++ b/doc/guides/nics/sfc_efx.rst\n@@ -134,6 +134,9 @@ Supported pattern items:\n - IPV4 (exact match of source/destination addresses,\n   IP transport protocol)\n \n+- IPV6 (exact match of source/destination addresses,\n+  IP transport protocol)\n+\n Supported actions:\n \n - VOID\ndiff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c\nindex ed71ec0..dcc19ff 100644\n--- a/drivers/net/sfc/sfc_flow.c\n+++ b/drivers/net/sfc/sfc_flow.c\n@@ -74,6 +74,7 @@ static sfc_flow_item_parse sfc_flow_parse_void;\n static sfc_flow_item_parse sfc_flow_parse_eth;\n static sfc_flow_item_parse sfc_flow_parse_vlan;\n static sfc_flow_item_parse sfc_flow_parse_ipv4;\n+static sfc_flow_item_parse sfc_flow_parse_ipv6;\n \n static boolean_t\n sfc_flow_is_zero(const uint8_t *buf, unsigned int size)\n@@ -391,6 +392,99 @@ sfc_flow_parse_ipv4(const struct rte_flow_item *item,\n \treturn -rte_errno;\n }\n \n+static int\n+sfc_flow_parse_ipv6(const struct rte_flow_item *item,\n+\t\t    efx_filter_spec_t *efx_spec,\n+\t\t    struct rte_flow_error *error)\n+{\n+\tint rc;\n+\tconst struct rte_flow_item_ipv6 *spec = NULL;\n+\tconst struct rte_flow_item_ipv6 *mask = NULL;\n+\tconst uint16_t ether_type_ipv6 = rte_cpu_to_le_16(EFX_ETHER_TYPE_IPV6);\n+\tconst struct rte_flow_item_ipv6 supp_mask = {\n+\t\t.hdr = {\n+\t\t\t.src_addr = { 0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff },\n+\t\t\t.dst_addr = { 0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff,\n+\t\t\t\t      0xff, 0xff, 0xff, 0xff },\n+\t\t\t.proto = 0xff,\n+\t\t}\n+\t};\n+\n+\trc = sfc_flow_parse_init(item,\n+\t\t\t\t (const void **)&spec,\n+\t\t\t\t (const void **)&mask,\n+\t\t\t\t &supp_mask,\n+\t\t\t\t &rte_flow_item_ipv6_mask,\n+\t\t\t\t sizeof(struct rte_flow_item_ipv6),\n+\t\t\t\t error);\n+\tif (rc != 0)\n+\t\treturn rc;\n+\n+\t/*\n+\t * Filtering by IPv6 source and destination addresses requires\n+\t * the appropriate ETHER_TYPE in hardware filters\n+\t */\n+\tif (!(efx_spec->efs_match_flags & EFX_FILTER_MATCH_ETHER_TYPE)) {\n+\t\tefx_spec->efs_match_flags |= EFX_FILTER_MATCH_ETHER_TYPE;\n+\t\tefx_spec->efs_ether_type = ether_type_ipv6;\n+\t} else if (efx_spec->efs_ether_type != ether_type_ipv6) {\n+\t\trte_flow_error_set(error, EINVAL,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t\"Ethertype in pattern with IPV6 item should be appropriate\");\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tif (spec == NULL)\n+\t\treturn 0;\n+\n+\t/* IPv6 adresses are in big-endian byte order in item and in efx_spec */\n+\tif (memcmp(mask->hdr.src_addr, supp_mask.hdr.src_addr,\n+\t\t   sizeof(mask->hdr.src_addr)) == 0) {\n+\t\tefx_spec->efs_match_flags |= EFX_FILTER_MATCH_REM_HOST;\n+\n+\t\tRTE_BUILD_BUG_ON(sizeof(efx_spec->efs_rem_host) !=\n+\t\t\t\t sizeof(spec->hdr.src_addr));\n+\t\trte_memcpy(&efx_spec->efs_rem_host, spec->hdr.src_addr,\n+\t\t\t   sizeof(efx_spec->efs_rem_host));\n+\t} else if (!sfc_flow_is_zero(mask->hdr.src_addr,\n+\t\t\t\t     sizeof(mask->hdr.src_addr))) {\n+\t\tgoto fail_bad_mask;\n+\t}\n+\n+\tif (memcmp(mask->hdr.dst_addr, supp_mask.hdr.dst_addr,\n+\t\t   sizeof(mask->hdr.dst_addr)) == 0) {\n+\t\tefx_spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_HOST;\n+\n+\t\tRTE_BUILD_BUG_ON(sizeof(efx_spec->efs_loc_host) !=\n+\t\t\t\t sizeof(spec->hdr.dst_addr));\n+\t\trte_memcpy(&efx_spec->efs_loc_host, spec->hdr.dst_addr,\n+\t\t\t   sizeof(efx_spec->efs_loc_host));\n+\t} else if (!sfc_flow_is_zero(mask->hdr.dst_addr,\n+\t\t\t\t     sizeof(mask->hdr.dst_addr))) {\n+\t\tgoto fail_bad_mask;\n+\t}\n+\n+\tif (mask->hdr.proto == supp_mask.hdr.proto) {\n+\t\tefx_spec->efs_match_flags |= EFX_FILTER_MATCH_IP_PROTO;\n+\t\tefx_spec->efs_ip_proto = spec->hdr.proto;\n+\t} else if (mask->hdr.proto != 0) {\n+\t\tgoto fail_bad_mask;\n+\t}\n+\n+\treturn 0;\n+\n+fail_bad_mask:\n+\trte_flow_error_set(error, EINVAL,\n+\t\t\t   RTE_FLOW_ERROR_TYPE_ITEM, item,\n+\t\t\t   \"Bad mask in the IPV6 pattern item\");\n+\treturn -rte_errno;\n+}\n+\n static const struct sfc_flow_item sfc_flow_items[] = {\n \t{\n \t\t.type = RTE_FLOW_ITEM_TYPE_VOID,\n@@ -416,6 +510,12 @@ static const struct sfc_flow_item sfc_flow_items[] = {\n \t\t.layer = SFC_FLOW_ITEM_L3,\n \t\t.parse = sfc_flow_parse_ipv4,\n \t},\n+\t{\n+\t\t.type = RTE_FLOW_ITEM_TYPE_IPV6,\n+\t\t.prev_layer = SFC_FLOW_ITEM_L2,\n+\t\t.layer = SFC_FLOW_ITEM_L3,\n+\t\t.parse = sfc_flow_parse_ipv6,\n+\t},\n };\n \n /*\n",
    "prefixes": [
        "dpdk-dev",
        "08/11"
    ]
}