get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96588,
    "url": "http://patches.dpdk.org/api/patches/96588/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210803083817.1243796-11-wenjun1.wu@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": "<20210803083817.1243796-11-wenjun1.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210803083817.1243796-11-wenjun1.wu@intel.com",
    "date": "2021-08-03T08:38:05",
    "name": "[10/22] net/ice/base: change protocol ID for VLAN in DVM",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "64f5229db2c4292c4c0950bd2469f33d65c9bf65",
    "submitter": {
        "id": 2083,
        "url": "http://patches.dpdk.org/api/people/2083/?format=api",
        "name": "Wenjun Wu",
        "email": "wenjun1.wu@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/20210803083817.1243796-11-wenjun1.wu@intel.com/mbox/",
    "series": [
        {
            "id": 18158,
            "url": "http://patches.dpdk.org/api/series/18158/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18158",
            "date": "2021-08-03T08:37:55",
            "name": "backport feature support to DPDK 20.11",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/18158/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/96588/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/96588/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 C8EDAA0C41;\n\tTue,  3 Aug 2021 10:58:10 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 74F44411BB;\n\tTue,  3 Aug 2021 10:57:24 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 7B1CA411C4\n for <dev@dpdk.org>; Tue,  3 Aug 2021 10:57:14 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Aug 2021 01:57:01 -0700",
            "from wuwenjun.sh.intel.com ([10.67.110.197])\n by fmsmga008.fm.intel.com with ESMTP; 03 Aug 2021 01:57:00 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10064\"; a=\"211764397\"",
            "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"211764397\"",
            "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"479396591\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wenjun Wu <wenjun1.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Aug 2021 16:38:05 +0800",
        "Message-Id": "<20210803083817.1243796-11-wenjun1.wu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210803083817.1243796-1-wenjun1.wu@intel.com>",
        "References": "<20210803083817.1243796-1-wenjun1.wu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 10/22] net/ice/base: change protocol ID for VLAN\n in DVM",
        "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": "From: Qi Zhang <qi.z.zhang@intel.com>\n\n[ upstream commit 8d7bb8d500b1ccdeb30668516064337faa20b364 ]\n\nProtocol id for first vlan in Double VLAN Mode (DVM) should be\nICE_VLAN_OF_HW = 16, but for Single VLAN Mode (SVM) this should be\nICE_VLAN_OL_HW = 17.\n\nChange protocol id in type to id translation array for outer vlan\nto 17 when DVM is enabled, which means the driver, package,\nand firmware support DVM.\n\nSigned-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_flex_pipe.c |  3 +++\n drivers/net/ice/base/ice_switch.c    | 19 ++++++++++++++++++-\n drivers/net/ice/base/ice_switch.h    |  1 +\n 3 files changed, 22 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c\nindex 058694653a..a92c2b8494 100644\n--- a/drivers/net/ice/base/ice_flex_pipe.c\n+++ b/drivers/net/ice/base/ice_flex_pipe.c\n@@ -1166,6 +1166,9 @@ ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg)\n \n \tice_cache_vlan_mode(hw);\n \n+\tif (ice_is_dvm_ena(hw))\n+\t\tice_change_proto_id_to_dvm();\n+\n \treturn status;\n }\n \ndiff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex df8319a7e7..55bfc3e6c5 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -6127,7 +6127,7 @@ static const struct ice_prot_ext_tbl_entry ice_prot_ext[ICE_PROTOCOL_LAST] = {\n  * following policy.\n  */\n \n-static const struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {\n+static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {\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@@ -6232,6 +6232,23 @@ static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts,\n \treturn ICE_MAX_NUM_RECIPES;\n }\n \n+/**\n+ * ice_change_proto_id_to_dvm - change proto id in prot_id_tbl\n+ *\n+ * As protocol id for outer vlan is different in dvm and svm, if dvm is\n+ * supported protocol array record for outer vlan has to be modified to\n+ * reflect the value proper for DVM.\n+ */\n+void ice_change_proto_id_to_dvm(void)\n+{\n+\tu8 i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(ice_prot_id_tbl); i++)\n+\t\tif (ice_prot_id_tbl[i].type == ICE_VLAN_OFOS &&\n+\t\t    ice_prot_id_tbl[i].protocol_id != ICE_VLAN_OF_HW)\n+\t\t\tice_prot_id_tbl[i].protocol_id = ICE_VLAN_OF_HW;\n+}\n+\n /**\n  * ice_prot_type_to_id - get protocol ID from protocol type\n  * @type: protocol type\ndiff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h\nindex 78e6be35a9..dd50820430 100644\n--- a/drivers/net/ice/base/ice_switch.h\n+++ b/drivers/net/ice/base/ice_switch.h\n@@ -536,4 +536,5 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type);\n enum ice_status\n ice_update_recipe_lkup_idx(struct ice_hw *hw,\n \t\t\t   struct ice_update_recipe_lkup_idx_params *params);\n+void ice_change_proto_id_to_dvm(void);\n #endif /* _ICE_SWITCH_H_ */\n",
    "prefixes": [
        "10/22"
    ]
}