get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96589,
    "url": "http://patchwork.dpdk.org/api/patches/96589/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210803083817.1243796-13-wenjun1.wu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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-13-wenjun1.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210803083817.1243796-13-wenjun1.wu@intel.com",
    "date": "2021-08-03T08:38:07",
    "name": "[12/22] net/ice/base: log if DDP/FW do not support QinQ",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "07d15758fe6357ce0d0750371803a3e5402cc934",
    "submitter": {
        "id": 2083,
        "url": "http://patchwork.dpdk.org/api/people/2083/?format=api",
        "name": "Wenjun Wu",
        "email": "wenjun1.wu@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210803083817.1243796-13-wenjun1.wu@intel.com/mbox/",
    "series": [
        {
            "id": 18158,
            "url": "http://patchwork.dpdk.org/api/series/18158/?format=api",
            "web_url": "http://patchwork.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://patchwork.dpdk.org/series/18158/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96589/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/96589/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 6D65DA0C41;\n\tTue,  3 Aug 2021 10:58:16 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9D8DA411F9;\n\tTue,  3 Aug 2021 10:57:25 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 44DE8411C8\n for <dev@dpdk.org>; Tue,  3 Aug 2021 10:57:15 +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:03 -0700",
            "from wuwenjun.sh.intel.com ([10.67.110.197])\n by fmsmga008.fm.intel.com with ESMTP; 03 Aug 2021 01:57:02 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10064\"; a=\"211764403\"",
            "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"211764403\"",
            "E=Sophos;i=\"5.84,291,1620716400\"; d=\"scan'208\";a=\"479396616\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wenjun Wu <wenjun1.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Aug 2021 16:38:07 +0800",
        "Message-Id": "<20210803083817.1243796-13-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 12/22] net/ice/base: log if DDP/FW do not support\n QinQ",
        "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 daa2ca4217ec6bf4fafb84f78985014b20cf5444 ]\n\nCurrently if the driver supports QinQ there is no message/information\nif the DDP and/or FW don't support QinQ. Add functionality that prints\nif the DDP and/or FW don't support QinQ if the driver attempts to\nconfigured DVM. This will make it more obvious to users in the field\nthat they need to update their DDP and/or FW.\n\nThis required a small refactor so some of the existing code could be\nshared and used by this new print functionality.\n\nSigned-off-by: Brett Creeley <brett.creeley@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_vlan_mode.c | 77 +++++++++++++++++++++++-----\n 1 file changed, 65 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_vlan_mode.c b/drivers/net/ice/base/ice_vlan_mode.c\nindex 4340189355..775ebb2d6e 100644\n--- a/drivers/net/ice/base/ice_vlan_mode.c\n+++ b/drivers/net/ice/base/ice_vlan_mode.c\n@@ -131,18 +131,11 @@ static void ice_cache_vlan_mode(struct ice_hw *hw)\n }\n \n /**\n- * ice_is_dvm_supported - check if Double VLAN Mode is supported\n- * @hw: pointer to the hardware structure\n- *\n- * Returns true if Double VLAN Mode (DVM) is supported and false if only Single\n- * VLAN Mode (SVM) is supported. In order for DVM to be supported the DDP and\n- * firmware must support it, otherwise only SVM is supported. This function\n- * should only be called while the global config lock is held and after the\n- * package has been successfully downloaded.\n+ * ice_pkg_supports_dvm - find out if DDP supports DVM\n+ * @hw: pointer to the HW structure\n  */\n-static bool ice_is_dvm_supported(struct ice_hw *hw)\n+static bool ice_pkg_supports_dvm(struct ice_hw *hw)\n {\n-\tstruct ice_aqc_get_vlan_mode get_vlan_mode = { 0 };\n \tenum ice_status status;\n \tbool pkg_supports_dvm;\n \n@@ -153,8 +146,17 @@ static bool ice_is_dvm_supported(struct ice_hw *hw)\n \t\treturn false;\n \t}\n \n-\tif (!pkg_supports_dvm)\n-\t\treturn false;\n+\treturn pkg_supports_dvm;\n+}\n+\n+/**\n+ * ice_fw_supports_dvm - find out if FW supports DVM\n+ * @hw: pointer to the HW structure\n+ */\n+static bool ice_fw_supports_dvm(struct ice_hw *hw)\n+{\n+\tstruct ice_aqc_get_vlan_mode get_vlan_mode = { 0 };\n+\tenum ice_status status;\n \n \t/* If firmware returns success, then it supports DVM, else it only\n \t * supports SVM\n@@ -169,6 +171,31 @@ static bool ice_is_dvm_supported(struct ice_hw *hw)\n \treturn true;\n }\n \n+/**\n+ * ice_is_dvm_supported - check if Double VLAN Mode is supported\n+ * @hw: pointer to the hardware structure\n+ *\n+ * Returns true if Double VLAN Mode (DVM) is supported and false if only Single\n+ * VLAN Mode (SVM) is supported. In order for DVM to be supported the DDP and\n+ * firmware must support it, otherwise only SVM is supported. This function\n+ * should only be called while the global config lock is held and after the\n+ * package has been successfully downloaded.\n+ */\n+static bool ice_is_dvm_supported(struct ice_hw *hw)\n+{\n+\tif (!ice_pkg_supports_dvm(hw)) {\n+\t\tice_debug(hw, ICE_DBG_PKG, \"DDP doesn't support DVM\\n\");\n+\t\treturn false;\n+\t}\n+\n+\tif (!ice_fw_supports_dvm(hw)) {\n+\t\tice_debug(hw, ICE_DBG_PKG, \"FW doesn't support DVM\\n\");\n+\t\treturn false;\n+\t}\n+\n+\treturn true;\n+}\n+\n #define ICE_EXTERNAL_VLAN_ID_FV_IDX\t\t\t11\n #define ICE_SW_LKUP_VLAN_LOC_LKUP_IDX\t\t\t1\n #define ICE_SW_LKUP_VLAN_PKT_FLAGS_LKUP_IDX\t\t2\n@@ -376,6 +403,30 @@ enum ice_status ice_set_vlan_mode(struct ice_hw *hw)\n \treturn ice_set_svm(hw);\n }\n \n+/**\n+ * ice_print_dvm_not_supported - print if DDP and/or FW doesn't support DVM\n+ * @hw: pointer to the HW structure\n+ *\n+ * The purpose of this function is to print that  QinQ is not supported due to\n+ * incompatibilty from the DDP and/or FW. This will give a hint to the user to\n+ * update one and/or both components if they expect QinQ functionality.\n+ */\n+static void ice_print_dvm_not_supported(struct ice_hw *hw)\n+{\n+\tbool pkg_supports_dvm = ice_pkg_supports_dvm(hw);\n+\tbool fw_supports_dvm = ice_fw_supports_dvm(hw);\n+\n+\tif (!fw_supports_dvm && !pkg_supports_dvm)\n+\t\tice_info(hw, \"QinQ functionality cannot be enabled on this device. \"\n+\t\t\t     \"Update your DDP package and NVM to versions that support QinQ.\\n\");\n+\telse if (!pkg_supports_dvm)\n+\t\tice_info(hw, \"QinQ functionality cannot be enabled on this device. \"\n+\t\t\t     \"Update your DDP package to a version that supports QinQ.\\n\");\n+\telse if (!fw_supports_dvm)\n+\t\tice_info(hw, \"QinQ functionality cannot be enabled on this device. \"\n+\t\t\t     \"Update your NVM to a version that supports QinQ.\\n\");\n+}\n+\n /**\n  * ice_post_pkg_dwnld_vlan_mode_cfg - configure VLAN mode after DDP download\n  * @hw: pointer to the HW structure\n@@ -395,4 +446,6 @@ void ice_post_pkg_dwnld_vlan_mode_cfg(struct ice_hw *hw)\n \n \tif (ice_is_dvm_ena(hw))\n \t\tice_change_proto_id_to_dvm();\n+\telse\n+\t\tice_print_dvm_not_supported(hw);\n }\n",
    "prefixes": [
        "12/22"
    ]
}