get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 89996,
    "url": "https://patches.dpdk.org/api/patches/89996/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210329054923.11424-1-alvinx.zhang@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": "<20210329054923.11424-1-alvinx.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210329054923.11424-1-alvinx.zhang@intel.com",
    "date": "2021-03-29T05:49:23",
    "name": "net/ice/base: support MPLS ethertype switch filter",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ef77ac5ef4add7e132f12a07e1ef2634f7a59849",
    "submitter": {
        "id": 1398,
        "url": "https://patches.dpdk.org/api/people/1398/?format=api",
        "name": "Alvin Zhang",
        "email": "alvinx.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210329054923.11424-1-alvinx.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 15935,
            "url": "https://patches.dpdk.org/api/series/15935/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15935",
            "date": "2021-03-29T05:49:23",
            "name": "net/ice/base: support MPLS ethertype switch filter",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15935/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/89996/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/89996/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 424DAA034F;\n\tMon, 29 Mar 2021 07:49:32 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 29CA340151;\n\tMon, 29 Mar 2021 07:49:32 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id CC7C940042\n for <dev@dpdk.org>; Mon, 29 Mar 2021 07:49:29 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Mar 2021 22:49:28 -0700",
            "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Mar 2021 22:49:27 -0700"
        ],
        "IronPort-SDR": [
            "\n RaDvdeLa4ndrJzySS23MLeh1JlwvcmuOe6fnuL2dBrPlpHGZZ3i7e6r16M0eUVmavhl4WPVgA+\n bXrrYYSWW5tw==",
            "\n MOS9pCE5s+sZthnW7pCq6/AzOjeMvpQtb9kdabDz6Xxv6gc4PukDJymsRWRJ6xE5HlUWlPjGZy\n Eca7eP0nNkRQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9937\"; a=\"211675867\"",
            "E=Sophos;i=\"5.81,285,1610438400\"; d=\"scan'208\";a=\"211675867\"",
            "E=Sophos;i=\"5.81,285,1610438400\"; d=\"scan'208\";a=\"444413043\""
        ],
        "From": "Alvin Zhang <alvinx.zhang@intel.com>",
        "To": "qiming.yang@intel.com,\n\tqi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Mon, 29 Mar 2021 13:49:23 +0800",
        "Message-Id": "<20210329054923.11424-1-alvinx.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] net/ice/base: support MPLS ethertype switch\n filter",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add MPLS training packet and offsets.\nAdd check if the type is MPLS for ethertype filters.\n\nFor example:\n   flow create 0 ingress pattern eth dst is 00:11:22:33:44:55\n   type is 0x8847 / end actions queue index 2 / end\n\nThis flow will result in all the matched ingress packets be\nforwarded to queue 2.\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 31 ++++++++++++++++++++++++++++++-\n 1 file changed, 30 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 3dc7642..5a64cb7 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -15,6 +15,7 @@\n #define ICE_IPV6_ETHER_ID\t\t0x86DD\n #define ICE_TCP_PROTO_ID\t\t0x06\n #define ICE_ETH_P_8021Q\t\t\t0x8100\n+#define ICE_MPLS_ETHER_ID\t\t0x8847\n \n /* Dummy ethernet header needed in the ice_aqc_sw_rules_elem\n  * struct to configure any switch filter rules.\n@@ -319,6 +320,25 @@ struct ice_dummy_pkt_offsets {\n \t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n };\n \n+/* offset info for MAC + MPLS dummy packet */\n+static const struct ice_dummy_pkt_offsets dummy_mpls_packet_offsets[] = {\n+\t{ ICE_MAC_OFOS,\t\t0 },\n+\t{ ICE_ETYPE_OL,\t\t12 },\n+\t{ ICE_PROTOCOL_LAST,\t0 },\n+};\n+\n+/* Dummy packet for MAC + MPLS */\n+static const u8 dummy_mpls_packet[] = {\n+\t0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */\n+\t0x00, 0x00, 0x00, 0x00,\n+\t0x00, 0x00, 0x00, 0x00,\n+\n+\t0x88, 0x47,\t\t/* ICE_ETYPE_OL 12 */\n+\t0x00, 0x00, 0x01, 0x00,\n+\n+\t0x00, 0x00,\t/* 2 bytes for 4 byte alignment */\n+};\n+\n /* offset info for MAC + VLAN (C-tag, 802.1Q) + IPv4 + TCP dummy packet */\n static const struct ice_dummy_pkt_offsets dummy_vlan_tcp_packet_offsets[] = {\n \t{ ICE_MAC_OFOS,\t\t0 },\n@@ -7727,7 +7747,7 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t      const struct ice_dummy_pkt_offsets **offsets)\n {\n \tbool tcp = false, udp = false, ipv6 = false, vlan = false;\n-\tbool gre = false;\n+\tbool gre = false, mpls = false;\n \tu16 i;\n \n \tfor (i = 0; i < lkups_cnt; i++) {\n@@ -7763,6 +7783,11 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t\t lkups[i].m_u.ipv4_hdr.protocol ==\n \t\t\t\t0xFF)\n \t\t\ttcp = true;\n+\t\telse if (lkups[i].type == ICE_ETYPE_OL &&\n+\t\t\t lkups[i].h_u.ethertype.ethtype_id ==\n+\t\t\t\tCPU_TO_BE16(ICE_MPLS_ETHER_ID) &&\n+\t\t\t lkups[i].m_u.ethertype.ethtype_id == 0xFFFF)\n+\t\t\tmpls = true;\n \t}\n \n \tif ((tun_type == ICE_SW_TUN_AND_NON_TUN_QINQ ||\n@@ -8058,6 +8083,10 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)\n \t\t*pkt = dummy_vlan_tcp_packet;\n \t\t*pkt_len = sizeof(dummy_vlan_tcp_packet);\n \t\t*offsets = dummy_vlan_tcp_packet_offsets;\n+\t}  else if (mpls) {\n+\t\t*pkt = dummy_mpls_packet;\n+\t\t*pkt_len = sizeof(dummy_mpls_packet);\n+\t\t*offsets = dummy_mpls_packet_offsets;\n \t} else {\n \t\t*pkt = dummy_tcp_packet;\n \t\t*pkt_len = sizeof(dummy_tcp_packet);\n",
    "prefixes": []
}