get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55736,
    "url": "http://patches.dpdk.org/api/patches/55736/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190701050450.43330-3-leyi.rong@intel.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": "<20190701050450.43330-3-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190701050450.43330-3-leyi.rong@intel.com",
    "date": "2019-07-01T05:04:49",
    "name": "[v2,2/3] net/ice/base: add support for ethertype switch filters",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1b6c326754e010fac3f5ca3ef89a69df09a6678b",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190701050450.43330-3-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 5237,
            "url": "http://patches.dpdk.org/api/series/5237/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5237",
            "date": "2019-07-01T05:04:47",
            "name": "update ice code that were not working correctly",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/5237/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55736/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55736/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 89EED1B4B6;\n\tMon,  1 Jul 2019 07:06:30 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 639555587\n\tfor <dev@dpdk.org>; Mon,  1 Jul 2019 07:06:27 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Jun 2019 22:06:27 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga004.jf.intel.com with ESMTP; 30 Jun 2019 22:06:25 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,437,1557212400\"; d=\"scan'208\";a=\"314765277\"",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tDan Nowlin <dan.nowlin@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Mon,  1 Jul 2019 13:04:49 +0800",
        "Message-Id": "<20190701050450.43330-3-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190701050450.43330-1-leyi.rong@intel.com>",
        "References": "<20190626023025.7039-1-leyi.rong@intel.com>\n\t<20190701050450.43330-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 2/3] net/ice/base: add support for ethertype\n\tswitch filters",
        "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": "Add protocol definitions for ethertype.\nAdd ice_ethtype_hdr structure definition into the ice_prot_hdr union.\nAdd ethtype offsets into the training packet maps.\n\nSigned-off-by: Dan Nowlin <dan.nowlin@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\nTested-by: Wei Zhao <wei.zhao1@intel.com>\n---\n drivers/net/ice/base/ice_protocol_type.h |  6 +++++\n drivers/net/ice/base/ice_switch.c        | 34 ++++++++++++++++++------\n 2 files changed, 32 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h\nindex 368ab0d16..cfbe3fbfa 100644\n--- a/drivers/net/ice/base/ice_protocol_type.h\n+++ b/drivers/net/ice/base/ice_protocol_type.h\n@@ -30,6 +30,7 @@\n enum ice_protocol_type {\n \tICE_MAC_OFOS = 0,\n \tICE_MAC_IL,\n+\tICE_ETYPE_OL,\n \tICE_IPV4_OFOS,\n \tICE_IPV4_IL,\n \tICE_IPV6_OFOS,\n@@ -108,6 +109,7 @@ enum ice_prot_id {\n \n #define ICE_MAC_OFOS_HW\t\t1\n #define ICE_MAC_IL_HW\t\t4\n+#define ICE_ETYPE_OL_HW\t\t9\n #define ICE_IPV4_OFOS_HW\t32\n #define ICE_IPV4_IL_HW\t\t33\n #define ICE_IPV6_OFOS_HW\t40\n@@ -140,6 +142,9 @@ struct ice_protocol_entry {\n struct ice_ether_hdr {\n \tu8 dst_addr[ETH_ALEN];\n \tu8 src_addr[ETH_ALEN];\n+};\n+\n+struct ice_ethtype_hdr {\n \tu16 ethtype_id;\n };\n \n@@ -201,6 +206,7 @@ struct ice_nvgre {\n \n union ice_prot_hdr {\n \tstruct ice_ether_hdr eth_hdr;\n+\tstruct ice_ethtype_hdr ethertype;\n \tstruct ice_ipv4_hdr ipv4_hdr;\n \tstruct ice_ipv6_hdr ipv6_hdr;\n \tstruct ice_l4_hdr l4_hdr;\ndiff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex feacfa483..538829771 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -61,6 +61,7 @@ struct ice_dummy_pkt_offsets {\n static const\n struct ice_dummy_pkt_offsets dummy_gre_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_NVGRE,\t\t34 },\n \t{ ICE_MAC_IL,\t\t42 },\n@@ -72,7 +73,7 @@ static const\n u8 dummy_gre_packet[] = { 0, 0, 0, 0,\t\t/* ICE_MAC_OFOS 0 */\n \t\t\t  0, 0, 0, 0,\n \t\t\t  0, 0, 0, 0,\n-\t\t\t  0x08, 0,\n+\t\t\t  0x08, 0,\t\t/* ICE_ETYPE_OL 12 */\n \t\t\t  0x45, 0, 0, 0x3E,\t/* ICE_IPV4_OFOS 14 */\n \t\t\t  0, 0, 0, 0,\n \t\t\t  0, 0x2F, 0, 0,\n@@ -94,6 +95,7 @@ u8 dummy_gre_packet[] = { 0, 0, 0, 0,\t\t/* ICE_MAC_OFOS 0 */\n static const\n struct ice_dummy_pkt_offsets dummy_udp_tun_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_UDP_OF,\t\t34 },\n \t{ ICE_VXLAN,\t\t42 },\n@@ -108,7 +110,8 @@ u8 dummy_udp_tun_tcp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x45, 0x00, 0x00, 0x5a, /* ICE_IPV4_OFOS 14 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -143,6 +146,7 @@ u8 dummy_udp_tun_tcp_packet[] = {\n static const\n struct ice_dummy_pkt_offsets dummy_udp_tun_udp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_UDP_OF,\t\t34 },\n \t{ ICE_VXLAN,\t\t42 },\n@@ -157,7 +161,8 @@ u8 dummy_udp_tun_udp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00,  /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x45, 0x00, 0x00, 0x4e, /* ICE_IPV4_OFOS 14 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -189,6 +194,7 @@ u8 dummy_udp_tun_udp_packet[] = {\n static const\n struct ice_dummy_pkt_offsets dummy_udp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_UDP_ILOS,\t\t34 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -199,7 +205,8 @@ dummy_udp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 14 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -216,6 +223,7 @@ dummy_udp_packet[] = {\n static const\n struct ice_dummy_pkt_offsets dummy_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV4_OFOS,\t14 },\n \t{ ICE_TCP_IL,\t\t34 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -226,7 +234,8 @@ dummy_tcp_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x08, 0x00,\n+\n+\t0x08, 0x00,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x45, 0x00, 0x00, 0x28, /* ICE_IPV4_OFOS 14 */\n \t0x00, 0x01, 0x00, 0x00,\n@@ -246,6 +255,7 @@ dummy_tcp_packet[] = {\n static const\n struct ice_dummy_pkt_offsets dummy_tcp_ipv6_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV6_OFOS,\t14 },\n \t{ ICE_TCP_IL,\t\t54 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -256,7 +266,8 @@ dummy_tcp_ipv6_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x86, 0xDD,\n+\n+\t0x86, 0xDD,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */\n \t0x00, 0x14, 0x06, 0x00, /* Next header is TCP */\n@@ -281,6 +292,7 @@ dummy_tcp_ipv6_packet[] = {\n static const\n struct ice_dummy_pkt_offsets dummy_udp_ipv6_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n \t{ ICE_IPV6_OFOS,\t14 },\n \t{ ICE_UDP_ILOS,\t\t54 },\n \t{ ICE_PROTOCOL_LAST,\t0 },\n@@ -291,7 +303,8 @@ dummy_udp_ipv6_packet[] = {\n \t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n \t0x00, 0x00, 0x00, 0x00,\n \t0x00, 0x00, 0x00, 0x00,\n-\t0x86, 0xDD,\n+\n+\t0x86, 0xDD,\t\t/* ICE_ETYPE_OL 12 */\n \n \t0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 40 */\n \t0x00, 0x08, 0x11, 0x00, /* Next header UDP*/\n@@ -4455,6 +4468,7 @@ ice_add_mac_with_counter(struct ice_hw *hw, struct ice_fltr_info *f_info)\n static const struct ice_prot_ext_tbl_entry ice_prot_ext[] = {\n \t{ ICE_MAC_OFOS,\t\t{ 0, 2, 4, 6, 8, 10, 12 } },\n \t{ ICE_MAC_IL,\t\t{ 0, 2, 4, 6, 8, 10, 12 } },\n+\t{ ICE_ETYPE_OL,\t\t{ 0 } },\n \t{ ICE_IPV4_OFOS,\t{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },\n \t{ ICE_IPV4_IL,\t\t{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18 } },\n \t{ ICE_IPV6_IL,\t\t{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24,\n@@ -4492,6 +4506,7 @@ static const struct ice_pref_recipe_group ice_recipe_pack[] = {\n static const struct ice_protocol_entry ice_prot_id_tbl[] = {\n \t{ ICE_MAC_OFOS,\t\tICE_MAC_OFOS_HW },\n \t{ ICE_MAC_IL,\t\tICE_MAC_IL_HW },\n+\t{ ICE_ETYPE_OL,\t\tICE_ETYPE_OL_HW },\n \t{ ICE_IPV4_OFOS,\tICE_IPV4_OFOS_HW },\n \t{ ICE_IPV4_IL,\t\tICE_IPV4_IL_HW },\n \t{ ICE_IPV6_OFOS,\tICE_IPV6_OFOS_HW },\n@@ -4618,7 +4633,7 @@ ice_fill_valid_words(struct ice_adv_lkup_elem *rule,\n \n \tfor (j = 0; j < sizeof(rule->m_u) / sizeof(u16); j++)\n \t\tif (((u16 *)&rule->m_u)[j] &&\n-\t\t    rule->type < ARRAY_SIZE(ice_prot_ext)) {\n+\t\t    (unsigned long)rule->type < ARRAY_SIZE(ice_prot_ext)) {\n \t\t\t/* No more space to accommodate */\n \t\t\tif (word >= ICE_MAX_CHAIN_WORDS)\n \t\t\t\treturn 0;\n@@ -5450,6 +5465,9 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\tcase ICE_MAC_IL:\n \t\t\tlen = sizeof(struct ice_ether_hdr);\n \t\t\tbreak;\n+\t\tcase ICE_ETYPE_OL:\n+\t\t\tlen = sizeof(struct ice_ethtype_hdr);\n+\t\t\tbreak;\n \t\tcase ICE_IPV4_OFOS:\n \t\tcase ICE_IPV4_IL:\n \t\t\tlen = sizeof(struct ice_ipv4_hdr);\n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}