get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61481,
    "url": "https://patches.dpdk.org/api/patches/61481/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191020045208.25069-1-kirankumark@marvell.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": "<20191020045208.25069-1-kirankumark@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191020045208.25069-1-kirankumark@marvell.com",
    "date": "2019-10-20T04:52:07",
    "name": "[v7] ethdev: add HIGIG2 key field to flow API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1b89a5b0240b78aba37844a8770dd6a1c7649710",
    "submitter": {
        "id": 1260,
        "url": "https://patches.dpdk.org/api/people/1260/?format=api",
        "name": "Kiran Kumar Kokkilagadda",
        "email": "kirankumark@marvell.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/20191020045208.25069-1-kirankumark@marvell.com/mbox/",
    "series": [
        {
            "id": 6946,
            "url": "https://patches.dpdk.org/api/series/6946/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6946",
            "date": "2019-10-20T04:52:07",
            "name": "[v7] ethdev: add HIGIG2 key field to flow API",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/6946/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/61481/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/61481/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 459BC1BF1E;\n\tSun, 20 Oct 2019 06:52:24 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id AB5CF1BEF3\n\tfor <dev@dpdk.org>; Sun, 20 Oct 2019 06:52:22 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx9K4qIb5030707; Sat, 19 Oct 2019 21:52:18 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2vqyuqaarx-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tSat, 19 Oct 2019 21:52:18 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tSat, 19 Oct 2019 21:52:17 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Sat, 19 Oct 2019 21:52:17 -0700",
            "from localhost.localdomain (unknown [10.28.34.15])\n\tby maili.marvell.com (Postfix) with ESMTP id E4A9B3F7040;\n\tSat, 19 Oct 2019 21:52:13 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-type; s=pfpt0818;\n\tbh=Jme6EyjYRZFtfFjExvKpd77KE8EFr7Rn42jCCHajBhU=; \n\tb=hhahPft3PTCa012s/qiVZDtIYC6gZdraesLtPTNNhBHukP8vJ6LZP2KO0ifIhaWt3R7s\n\tePzGj8t6TweGeMyRdZdeXc+Ga1sKREIOzhgt5J9wib0oXEi68+E+G+VRasNlNUCbdcQz\n\t9VjG1fv4KqOMoMWbeCaiunnqkwxlsoMzcEB2uRnU4cjMPmb66++bZb1GpWVO4Z5F95hD\n\tc2NtdXSrf52kB18KF5+BUbbUGVKGEj/boMAUOG0nfPW8/HxfXn5/fiqL15JOnqs7rMo3\n\t99IBWWzc5PkAUVXoF7XqIX6/ofZ7thZK9A6rWENea4zrCEmRYox9OhKPeaABCa/WP/7E\n\thg== ",
        "From": "<kirankumark@marvell.com>",
        "To": "Adrien Mazarguil <adrien.mazarguil@6wind.com>, Wenzhuo Lu\n\t<wenzhuo.lu@intel.com>, Jingjing Wu <jingjing.wu@intel.com>, \"Bernard\n\tIremonger\" <bernard.iremonger@intel.com>, John McNamara\n\t<john.mcnamara@intel.com>, Marko Kovacevic <marko.kovacevic@intel.com>,\n\tThomas Monjalon <thomas@monjalon.net>,\n\tFerruh Yigit <ferruh.yigit@intel.com>,\n\tAndrew Rybchenko <arybchenko@solarflare.com>, Olivier Matz\n\t<olivier.matz@6wind.com>",
        "CC": "<dev@dpdk.org>, <ajit.khaparde@broadcom.com>, Kiran Kumar K\n\t<kirankumark@marvell.com>",
        "Date": "Sun, 20 Oct 2019 10:22:07 +0530",
        "Message-ID": "<20191020045208.25069-1-kirankumark@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191019045657.399-1-kirankumark@marvell.com>",
        "References": "<20191019045657.399-1-kirankumark@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.95,1.0.8\n\tdefinitions=2019-10-20_02:2019-10-18,2019-10-20 signatures=0",
        "Subject": "[dpdk-dev]  [PATCH v7] ethdev: add HIGIG2 key field to flow API",
        "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": "From: Kiran Kumar K <kirankumark@marvell.com>\n\nAdd new rte_flow_item_higig2_hdr in order to match higig2 header.\nIt is a layer 2.5 protocol and used in Broadcom switches.\nHeader format is based on the following document.\nhttp://read.pudn.com/downloads558/doc/comm/2301468/HiGig_protocol.pdf\n\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nAcked-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\nV7 changes:\n* Added doxygen comments\n* Moved rte_flow specific code to rte_flow.h\n\nV6 changes:\n* Updated doxy-api\n\nV5 changes:\n* Changed broadcom to Broadcom\n* Changed RTE_HIGIG2_H to RTE_HIGIG_H\n* Fixed meson build\n\nV4 Changes:\n* Removed packed attribute\n\nV3 Changes:\n* Fixed Copyright header\n* Fixed version info in the subject\n\nV2 Changes:\n* Added support in testpmd to parse the higig2 item\n* Moved the higig2 header to new file\n* Added indentation in doc\n\n app/test-pmd/cmdline_flow.c        |  33 +++++++\n doc/api/doxy-api-index.md          |   3 +-\n doc/guides/prog_guide/rte_flow.rst |   8 ++\n lib/librte_ethdev/rte_flow.c       |   1 +\n lib/librte_ethdev/rte_flow.h       |  27 ++++++\n lib/librte_net/Makefile            |   2 +-\n lib/librte_net/meson.build         |   3 +-\n lib/librte_net/rte_higig.h         | 144 +++++++++++++++++++++++++++++\n 8 files changed, 218 insertions(+), 3 deletions(-)\n create mode 100644 lib/librte_net/rte_higig.h\n\n--\n2.17.1",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex b26b8bfe2..970bdef1d 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -203,6 +203,9 @@ enum index {\n \tITEM_PPPOED,\n \tITEM_PPPOE_SEID,\n \tITEM_PPPOE_PROTO_ID,\n+\tITEM_HIGIG2,\n+\tITEM_HIGIG2_CLASSIFICATION,\n+\tITEM_HIGIG2_VID,\n\n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -675,6 +678,7 @@ static const enum index next_item[] = {\n \tITEM_PPPOES,\n \tITEM_PPPOED,\n \tITEM_PPPOE_PROTO_ID,\n+\tITEM_HIGIG2,\n \tEND_SET,\n \tZERO,\n };\n@@ -939,6 +943,13 @@ static const enum index item_pppoe_proto_id[] = {\n \tZERO,\n };\n\n+static const enum index item_higig2[] = {\n+\tITEM_HIGIG2_CLASSIFICATION,\n+\tITEM_HIGIG2_VID,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -2419,6 +2430,28 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(item_pppoe_proto_id),\n \t\t.call = parse_vc,\n \t},\n+\t[ITEM_HIGIG2] = {\n+\t\t.name = \"higig2\",\n+\t\t.help = \"matches higig2 header\",\n+\t\t.priv = PRIV_ITEM(HIGIG2,\n+\t\t\t\tsizeof(struct rte_flow_item_higig2_hdr)),\n+\t\t.next = NEXT(item_higig2),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_HIGIG2_CLASSIFICATION] = {\n+\t\t.name = \"classification\",\n+\t\t.help = \"matches classification of higig2 header\",\n+\t\t.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,\n+\t\t\t\t\thdr.ppt1.classification)),\n+\t},\n+\t[ITEM_HIGIG2_VID] = {\n+\t\t.name = \"vid\",\n+\t\t.help = \"matches vid of higig2 header\",\n+\t\t.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,\n+\t\t\t\t\thdr.ppt1.vid)),\n+\t},\n \t/* Validate/create actions. */\n \t[ACTIONS] = {\n \t\t.name = \"actions\",\ndiff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md\nindex 6c2d888ee..c52b54e55 100644\n--- a/doc/api/doxy-api-index.md\n+++ b/doc/api/doxy-api-index.md\n@@ -101,7 +101,8 @@ The public API headers are grouped by topics:\n   [GSO]                (@ref rte_gso.h),\n   [frag/reass]         (@ref rte_ip_frag.h),\n   [LPM IPv4 route]     (@ref rte_lpm.h),\n-  [LPM IPv6 route]     (@ref rte_lpm6.h)\n+  [LPM IPv6 route]     (@ref rte_lpm6.h),\n+  [HIGIG]              (@ref rte_higig.h)\n\n - **QoS**:\n   [metering]           (@ref rte_meter.h),\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 1c837ff13..6e6d44df2 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1289,6 +1289,14 @@ Matches a IP Authentication Header (RFC 4302).\n - ``seq_num``: counter value increased by 1 on each packet sent.\n - Default ``mask`` matches spi.\n\n+Item: ``HIGIG2``\n+^^^^^^^^^^^^^^^^^\n+\n+Matches a HIGIG2 header field. It is layer 2.5 protocol and used in\n+Broadcom switches.\n+\n+- Default ``mask`` matches classification and vlan.\n+\n\n Actions\n ~~~~~~~\ndiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex 81a85b995..ca0f68016 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -83,6 +83,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(NSH, sizeof(struct rte_flow_item_nsh)),\n \tMK_FLOW_ITEM(IGMP, sizeof(struct rte_flow_item_igmp)),\n \tMK_FLOW_ITEM(AH, sizeof(struct rte_flow_item_ah)),\n+\tMK_FLOW_ITEM(HIGIG2, sizeof(struct rte_flow_item_higig2_hdr)),\n };\n\n /** Generate flow_action[] entry. */\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex bcfc06cdc..536d0f280 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -27,6 +27,7 @@\n #include <rte_udp.h>\n #include <rte_byteorder.h>\n #include <rte_esp.h>\n+#include <rte_higig.h>\n\n #ifdef __cplusplus\n extern \"C\" {\n@@ -491,8 +492,34 @@ enum rte_flow_item_type {\n \t *\n \t */\n \tRTE_FLOW_ITEM_TYPE_AH,\n+\n+\t/**\n+\t * Matches a HIGIG header.\n+\t * see struct rte_flow_item_higig2_hdr.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_HIGIG2,\n };\n\n+/**\n+ *\n+ * RTE_FLOW_ITEM_TYPE_HIGIG2\n+ * Matches higig2 header\n+ */\n+RTE_STD_C11\n+struct rte_flow_item_higig2_hdr {\n+\tstruct rte_higig2_hdr hdr;\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_HIGIG2. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask = {\n+\t.hdr = {\n+\t\t.ppt1.classification = 0xffff,\n+\t\t.ppt1.vid = 0xfff,\n+\t},\n+};\n+#endif\n+\n /**\n  * RTE_FLOW_ITEM_TYPE_ANY\n  *\ndiff --git a/lib/librte_net/Makefile b/lib/librte_net/Makefile\nindex 1244c9fd5..62735a5f9 100644\n--- a/lib/librte_net/Makefile\n+++ b/lib/librte_net/Makefile\n@@ -21,6 +21,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_NET) += rte_arp.c\n SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include := rte_ip.h rte_tcp.h rte_udp.h rte_esp.h\n SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include += rte_sctp.h rte_icmp.h rte_arp.h\n SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include += rte_ether.h rte_gre.h rte_net.h\n-SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include += rte_net_crc.h rte_mpls.h\n+SYMLINK-$(CONFIG_RTE_LIBRTE_NET)-include += rte_net_crc.h rte_mpls.h rte_higig.h\n\n include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/lib/librte_net/meson.build b/lib/librte_net/meson.build\nindex 868a93fd6..c52c34592 100644\n--- a/lib/librte_net/meson.build\n+++ b/lib/librte_net/meson.build\n@@ -14,7 +14,8 @@ headers = files('rte_ip.h',\n \t'rte_gre.h',\n \t'rte_net.h',\n \t'rte_net_crc.h',\n-\t'rte_mpls.h')\n+\t'rte_mpls.h',\n+\t'rte_higig.h')\n\n sources = files('rte_arp.c', 'rte_ether.c', 'rte_net.c', 'rte_net_crc.c')\n deps += ['mbuf']\ndiff --git a/lib/librte_net/rte_higig.h b/lib/librte_net/rte_higig.h\nnew file mode 100644\nindex 000000000..a56267473\n--- /dev/null\n+++ b/lib/librte_net/rte_higig.h\n@@ -0,0 +1,144 @@\n+\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef _RTE_HIGIG_H_\n+#define _RTE_HIGIG_H_\n+\n+#include <stdint.h>\n+#include <rte_byteorder.h>\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ *\n+ * higig2 frc header.\n+ */\n+struct rte_higig2_frc {\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint32_t ksop:8;\n+\tuint32_t tc:4;\n+\tuint32_t mcst:1;\n+\tuint32_t resv:3;\n+\tuint32_t dst_modid:8;\n+\tuint32_t dst_pid:8;\n+\tuint32_t src_modid:8;\n+\tuint32_t src_pid:8;\n+\tuint32_t lbid:8;\n+\tuint32_t ppd_type:3;\n+\tuint32_t resv1:3;\n+\tuint32_t dp:2;\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint32_t ksop:8;\n+\tuint32_t resv:3;\n+\tuint32_t mcst:1;\n+\tuint32_t tc:4;\n+\tuint32_t dst_modid:8;\n+\tuint32_t dst_pid:8;\n+\tuint32_t src_modid:8;\n+\tuint32_t src_pid:8;\n+\tuint32_t lbid:8;\n+\tuint32_t dp:2;\n+\tuint32_t resv1:3;\n+\tuint32_t ppd_type:3;\n+#endif\n+};\n+\n+\n+/**\n+ *\n+ * higig2 ppt type0 header\n+ */\n+struct rte_higig2_ppt_type0 {\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint32_t mirror:1;\n+\tuint32_t mirror_done:1;\n+\tuint32_t mirror_only:1;\n+\tuint32_t ingress_tagged:1;\n+\tuint32_t dst_tgid:3;\n+\tuint32_t dst_t:1;\n+\tuint32_t vc_label2:4;\n+\tuint32_t label_present:1;\n+\tuint32_t l3:1;\n+\tuint32_t res:2;\n+\tuint32_t vc_label1:8;\n+\tuint32_t vc_label0:8;\n+\tuint32_t vid_high:8;\n+\tuint32_t vid_low:8;\n+\tuint32_t opcode:3;\n+\tuint32_t res1:2;\n+\tuint32_t src_t:1;\n+\tuint32_t pfm:2;\n+\tuint32_t res2:5;\n+\tuint32_t hdr_ext_len:3;\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint32_t dst_t:1;\n+\tuint32_t dst_tgid:3;\n+\tuint32_t ingress_tagged:1;\n+\tuint32_t mirror_only:1;\n+\tuint32_t mirror_done:1;\n+\tuint32_t mirror:1;\n+\tuint32_t res:2;\n+\tuint32_t l3:1;\n+\tuint32_t label_present:1;\n+\tuint32_t vc_label2:4;\n+\tuint32_t vc_label1:8;\n+\tuint32_t vc_label0:8;\n+\tuint32_t vid_high:8;\n+\tuint32_t vid_low:8;\n+\tuint32_t pfm:2;\n+\tuint32_t src_t:1;\n+\tuint32_t res1:2;\n+\tuint32_t opcode:3;\n+\tuint32_t hdr_ext_len:3;\n+\tuint32_t res2:5;\n+#endif\n+};\n+\n+\n+/**\n+ *\n+ * higig2 ppt type1 header.\n+ */\n+struct rte_higig2_ppt_type1 {\n+\tuint16_t classification;\n+\tuint16_t resv;\n+\tuint16_t vid;\n+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN\n+\tuint16_t opcode:3;\n+\tuint16_t resv1:2;\n+\tuint16_t src_t:1;\n+\tuint16_t pfm:2;\n+\tuint16_t resv2:5;\n+\tuint16_t hdr_ext_len:3;\n+#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN\n+\tuint16_t pfm:2;\n+\tuint16_t src_t:1;\n+\tuint16_t resv1:2;\n+\tuint16_t opcode:3;\n+\tuint16_t hdr_ext_len:3;\n+\tuint16_t resv2:5;\n+#endif\n+};\n+\n+/**\n+ *\n+ * higig2 header\n+ */\n+RTE_STD_C11\n+struct rte_higig2_hdr {\n+\tstruct rte_higig2_frc fcr;\n+\tunion {\n+\t\tstruct rte_higig2_ppt_type0 ppt0;\n+\t\tstruct rte_higig2_ppt_type1 ppt1;\n+\t};\n+};\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* RTE_HIGIG_H_ */\n",
    "prefixes": [
        "v7"
    ]
}