get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1041529,
    "url": "http://patchwork.ozlabs.org/api/patches/1041529/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190213185115.25877-14-anirudh.venkataramanan@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20190213185115.25877-14-anirudh.venkataramanan@intel.com>",
    "list_archive_url": null,
    "date": "2019-02-13T18:51:13",
    "name": "[S14,13/15] ice: use virt channel status codes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e3fab914682264120c810890023e5bd5f5d8449d",
    "submitter": {
        "id": 73601,
        "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api",
        "name": "Anirudh Venkataramanan",
        "email": "anirudh.venkataramanan@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190213185115.25877-14-anirudh.venkataramanan@intel.com/mbox/",
    "series": [
        {
            "id": 91786,
            "url": "http://patchwork.ozlabs.org/api/series/91786/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=91786",
            "date": "2019-02-13T18:51:02",
            "name": "Implementation updates for ice",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/91786/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1041529/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1041529/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4407w84lG4z9s2P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Feb 2019 05:53:44 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6102B227FA;\n\tWed, 13 Feb 2019 18:53:42 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LQyt7rhDMU39; Wed, 13 Feb 2019 18:53:38 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id CAE8D2284C;\n\tWed, 13 Feb 2019 18:53:38 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8894B1BF994\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Feb 2019 18:51:24 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id BBD2022D9E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Feb 2019 18:51:20 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ut4QE5vVCCaM for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Feb 2019 18:51:19 +0000 (UTC)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 2FA2022D24\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 13 Feb 2019 18:51:18 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Feb 2019 10:51:18 -0800",
            "from shasta.jf.intel.com ([10.166.241.11])\n\tby orsmga001.jf.intel.com with ESMTP; 13 Feb 2019 10:51:16 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,366,1544515200\"; d=\"scan'208\";a=\"138354246\"",
        "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 13 Feb 2019 10:51:13 -0800",
        "Message-Id": "<20190213185115.25877-14-anirudh.venkataramanan@intel.com>",
        "X-Mailer": "git-send-email 2.14.5",
        "In-Reply-To": "<20190213185115.25877-1-anirudh.venkataramanan@intel.com>",
        "References": "<20190213185115.25877-1-anirudh.venkataramanan@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH S14 13/15] ice: use virt channel status\n\tcodes",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Mitch Williams <mitch.a.williams@intel.com>\n\nWhen communicating with the AVF driver, we need to use the status codes\nfrom virtchnl.h, not our own ice-specific codes. Without this, when an\nerror occurs, the VF will report nonsensical results.\n\nNOTE: this depends on changes made to include/linux/avf/virtchnl.h by\ncommit bb58fd7eeffc (\"i40e: Update status codes\")\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n[Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> cleaned up commit message]\n---\n drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 273 +++++++++++++----------\n 1 file changed, 154 insertions(+), 119 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex 5a6d6c8e3060..e2517ab696e9 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -4,6 +4,37 @@\n #include \"ice.h\"\n #include \"ice_lib.h\"\n \n+/**\n+ * ice_err_to_virt err - translate errors for VF return code\n+ * @ice_err: error return code\n+ */\n+static enum virtchnl_status_code ice_err_to_virt_err(enum ice_status ice_err)\n+{\n+\tswitch (ice_err) {\n+\tcase ICE_SUCCESS:\n+\t\treturn VIRTCHNL_STATUS_SUCCESS;\n+\tcase ICE_ERR_BAD_PTR:\n+\tcase ICE_ERR_INVAL_SIZE:\n+\tcase ICE_ERR_DEVICE_NOT_SUPPORTED:\n+\tcase ICE_ERR_PARAM:\n+\tcase ICE_ERR_CFG:\n+\t\treturn VIRTCHNL_STATUS_ERR_PARAM;\n+\tcase ICE_ERR_NO_MEMORY:\n+\t\treturn VIRTCHNL_STATUS_ERR_NO_MEMORY;\n+\tcase ICE_ERR_NOT_READY:\n+\tcase ICE_ERR_RESET_FAILED:\n+\tcase ICE_ERR_FW_API_VER:\n+\tcase ICE_ERR_AQ_ERROR:\n+\tcase ICE_ERR_AQ_TIMEOUT:\n+\tcase ICE_ERR_AQ_FULL:\n+\tcase ICE_ERR_AQ_NO_WORK:\n+\tcase ICE_ERR_AQ_EMPTY:\n+\t\treturn VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n+\tdefault:\n+\t\treturn VIRTCHNL_STATUS_ERR_NOT_SUPPORTED;\n+\t}\n+}\n+\n /**\n  * ice_vc_vf_broadcast - Broadcast a message to all VFs on PF\n  * @pf: pointer to the PF structure\n@@ -14,7 +45,7 @@\n  */\n static void\n ice_vc_vf_broadcast(struct ice_pf *pf, enum virtchnl_ops v_opcode,\n-\t\t    enum ice_status v_retval, u8 *msg, u16 msglen)\n+\t\t    enum virtchnl_status_code v_retval, u8 *msg, u16 msglen)\n {\n \tstruct ice_hw *hw = &pf->hw;\n \tstruct ice_vf *vf = pf->vf;\n@@ -104,7 +135,8 @@ static void ice_vc_notify_vf_link_state(struct ice_vf *vf)\n \t\tice_set_pfe_link(vf, &pfe, ls->link_speed, ls->link_info &\n \t\t\t\t ICE_AQ_LINK_UP);\n \n-\tice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT, 0, (u8 *)&pfe,\n+\tice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT,\n+\t\t\t      VIRTCHNL_STATUS_SUCCESS, (u8 *)&pfe,\n \t\t\t      sizeof(pfe), NULL);\n }\n \n@@ -1043,7 +1075,7 @@ void ice_vc_notify_reset(struct ice_pf *pf)\n \n \tpfe.event = VIRTCHNL_EVENT_RESET_IMPENDING;\n \tpfe.severity = PF_EVENT_SEVERITY_CERTAIN_DOOM;\n-\tice_vc_vf_broadcast(pf, VIRTCHNL_OP_EVENT, ICE_SUCCESS,\n+\tice_vc_vf_broadcast(pf, VIRTCHNL_OP_EVENT, VIRTCHNL_STATUS_SUCCESS,\n \t\t\t    (u8 *)&pfe, sizeof(struct virtchnl_pf_event));\n }\n \n@@ -1066,8 +1098,9 @@ static void ice_vc_notify_vf_reset(struct ice_vf *vf)\n \n \tpfe.event = VIRTCHNL_EVENT_RESET_IMPENDING;\n \tpfe.severity = PF_EVENT_SEVERITY_CERTAIN_DOOM;\n-\tice_aq_send_msg_to_vf(&vf->pf->hw, vf->vf_id, VIRTCHNL_OP_EVENT, 0,\n-\t\t\t      (u8 *)&pfe, sizeof(pfe), NULL);\n+\tice_aq_send_msg_to_vf(&vf->pf->hw, vf->vf_id, VIRTCHNL_OP_EVENT,\n+\t\t\t      VIRTCHNL_STATUS_SUCCESS, (u8 *)&pfe, sizeof(pfe),\n+\t\t\t      NULL);\n }\n \n /**\n@@ -1288,8 +1321,8 @@ static void ice_vc_dis_vf(struct ice_vf *vf)\n  * send msg to VF\n  */\n static int\n-ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode, enum ice_status v_retval,\n-\t\t      u8 *msg, u16 msglen)\n+ice_vc_send_msg_to_vf(struct ice_vf *vf, u32 v_opcode,\n+\t\t      enum virtchnl_status_code v_retval, u8 *msg, u16 msglen)\n {\n \tenum ice_status aq_ret;\n \tstruct ice_pf *pf;\n@@ -1349,8 +1382,8 @@ static int ice_vc_get_ver_msg(struct ice_vf *vf, u8 *msg)\n \tif (VF_IS_V10(&vf->vf_ver))\n \t\tinfo.minor = VIRTCHNL_VERSION_MINOR_NO_VF_CAPS;\n \n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_VERSION, ICE_SUCCESS,\n-\t\t\t\t     (u8 *)&info,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_VERSION,\n+\t\t\t\t     VIRTCHNL_STATUS_SUCCESS, (u8 *)&info,\n \t\t\t\t     sizeof(struct virtchnl_version_info));\n }\n \n@@ -1363,15 +1396,15 @@ static int ice_vc_get_ver_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_vf_resource *vfres = NULL;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_vsi *vsi;\n \tint len = 0;\n \tint ret;\n \n \tif (!test_bit(ICE_VF_STATE_INIT, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto err;\n \t}\n \n@@ -1379,7 +1412,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n \n \tvfres = devm_kzalloc(&pf->pdev->dev, len, GFP_KERNEL);\n \tif (!vfres) {\n-\t\taq_ret = ICE_ERR_NO_MEMORY;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY;\n \t\tlen = 0;\n \t\tgoto err;\n \t}\n@@ -1393,7 +1426,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n \tvfres->vf_cap_flags = VIRTCHNL_VF_OFFLOAD_L2;\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto err;\n \t}\n \n@@ -1447,7 +1480,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)\n \n err:\n \t/* send the response back to the VF */\n-\tret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_VF_RESOURCES, aq_ret,\n+\tret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_VF_RESOURCES, v_ret,\n \t\t\t\t    (u8 *)vfres, len);\n \n \tdevm_kfree(&pf->pdev->dev, vfres);\n@@ -1527,43 +1560,42 @@ static bool ice_vc_isvalid_q_id(struct ice_vf *vf, u16 vsi_id, u8 qid)\n  */\n static int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_rss_key *vrk =\n \t\t(struct virtchnl_rss_key *)msg;\n-\tstruct ice_vsi *vsi = NULL;\n \tstruct ice_pf *pf = vf->pf;\n-\tenum ice_status aq_ret;\n-\tint ret;\n+\tstruct ice_vsi *vsi = NULL;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vrk->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (vrk->key_len != ICE_VSIQF_HKEY_ARRAY_SIZE) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n-\tret = ice_set_rss(vsi, vrk->key, NULL, 0);\n-\taq_ret = ret ? ICE_ERR_PARAM : ICE_SUCCESS;\n+\tif (ice_set_rss(vsi, vrk->key, NULL, 0))\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n error_param:\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_KEY, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_KEY, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1577,41 +1609,40 @@ static int ice_vc_config_rss_key(struct ice_vf *vf, u8 *msg)\n static int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)\n {\n \tstruct virtchnl_rss_lut *vrl = (struct virtchnl_rss_lut *)msg;\n-\tstruct ice_vsi *vsi = NULL;\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct ice_pf *pf = vf->pf;\n-\tenum ice_status aq_ret;\n-\tint ret;\n+\tstruct ice_vsi *vsi = NULL;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vrl->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (vrl->lut_entries != ICE_VSIQF_HLUT_ARRAY_SIZE) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!test_bit(ICE_FLAG_RSS_ENA, vf->pf->flags)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n-\tret = ice_set_rss(vsi, NULL, vrl->lut, ICE_VSIQF_HLUT_ARRAY_SIZE);\n-\taq_ret = ret ? ICE_ERR_PARAM : ICE_SUCCESS;\n+\tif (ice_set_rss(vsi, NULL, vrl->lut, ICE_VSIQF_HLUT_ARRAY_SIZE))\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n error_param:\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_LUT, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_LUT, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1624,26 +1655,26 @@ static int ice_vc_config_rss_lut(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_get_stats_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_queue_select *vqs =\n \t\t(struct virtchnl_queue_select *)msg;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_eth_stats stats;\n \tstruct ice_vsi *vsi;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vqs->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1654,7 +1685,7 @@ static int ice_vc_get_stats_msg(struct ice_vf *vf, u8 *msg)\n \n error_param:\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_STATS, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_STATS, v_ret,\n \t\t\t\t     (u8 *)&stats, sizeof(stats));\n }\n \n@@ -1667,30 +1698,30 @@ static int ice_vc_get_stats_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_queue_select *vqs =\n \t    (struct virtchnl_queue_select *)msg;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_vsi *vsi;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vqs->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!vqs->rx_queues && !vqs->tx_queues) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1699,15 +1730,15 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)\n \t * programmed using ice_vsi_cfg_txqs\n \t */\n \tif (ice_vsi_start_rx_rings(vsi))\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \n \t/* Set flag to indicate that queues are enabled */\n-\tif (!aq_ret)\n+\tif (v_ret == VIRTCHNL_STATUS_SUCCESS)\n \t\tset_bit(ICE_VF_STATE_ENA, vf->vf_states);\n \n error_param:\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1721,31 +1752,31 @@ static int ice_vc_ena_qs_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_queue_select *vqs =\n \t    (struct virtchnl_queue_select *)msg;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_vsi *vsi;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states) &&\n \t    !test_bit(ICE_VF_STATE_ENA, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vqs->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!vqs->rx_queues && !vqs->tx_queues) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1753,23 +1784,23 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)\n \t\tdev_err(&vsi->back->pdev->dev,\n \t\t\t\"Failed to stop tx rings on VSI %d\\n\",\n \t\t\tvsi->vsi_num);\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t}\n \n \tif (ice_vsi_stop_rx_rings(vsi)) {\n \t\tdev_err(&vsi->back->pdev->dev,\n \t\t\t\"Failed to stop rx rings on VSI %d\\n\",\n \t\t\tvsi->vsi_num);\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t}\n \n \t/* Clear enabled queues flag */\n-\tif (!aq_ret)\n+\tif (v_ret == VIRTCHNL_STATUS_SUCCESS)\n \t\tclear_bit(ICE_VF_STATE_ENA, vf->vf_states);\n \n error_param:\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DISABLE_QUEUES, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DISABLE_QUEUES, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1782,18 +1813,18 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_irq_map_info *irqmap_info =\n \t    (struct virtchnl_irq_map_info *)msg;\n \tu16 vsi_id, vsi_q_id, vector_id;\n \tstruct virtchnl_vector_map *map;\n \tstruct ice_vsi *vsi = NULL;\n \tstruct ice_pf *pf = vf->pf;\n-\tenum ice_status aq_ret = 0;\n \tunsigned long qmap;\n \tint i;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1805,13 +1836,13 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n \t\t/* validate msg params */\n \t\tif (!(vector_id < pf->hw.func_caps.common_cap\n \t\t    .num_msix_vectors) || !ice_vc_isvalid_vsi_id(vf, vsi_id)) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto error_param;\n \t\t}\n \n \t\tvsi = pf->vsi[vf->lan_vsi_idx];\n \t\tif (!vsi) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto error_param;\n \t\t}\n \n@@ -1821,7 +1852,7 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n \t\t\tstruct ice_q_vector *q_vector;\n \n \t\t\tif (!ice_vc_isvalid_q_id(vf, vsi_id, vsi_q_id)) {\n-\t\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\tgoto error_param;\n \t\t\t}\n \t\t\tq_vector = vsi->q_vectors[i];\n@@ -1835,7 +1866,7 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n \t\t\tstruct ice_q_vector *q_vector;\n \n \t\t\tif (!ice_vc_isvalid_q_id(vf, vsi_id, vsi_q_id)) {\n-\t\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\tgoto error_param;\n \t\t\t}\n \t\t\tq_vector = vsi->q_vectors[i];\n@@ -1849,7 +1880,7 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n \t\tice_vsi_cfg_msix(vsi);\n error_param:\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_IRQ_MAP, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_IRQ_MAP, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1862,27 +1893,26 @@ static int ice_vc_cfg_irq_map_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_vsi_queue_config_info *qci =\n \t    (struct virtchnl_vsi_queue_config_info *)msg;\n \tstruct virtchnl_queue_pair_info *qpi;\n \tstruct ice_pf *pf = vf->pf;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_vsi *vsi;\n \tint i;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, qci->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1890,7 +1920,7 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)\n \t\tdev_err(&pf->pdev->dev,\n \t\t\t\"VF-%d requesting more than supported number of queues: %d\\n\",\n \t\t\tvf->vf_id, qci->num_queue_pairs);\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -1900,7 +1930,7 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)\n \t\t    qpi->rxq.vsi_id != qci->vsi_id ||\n \t\t    qpi->rxq.queue_id != qpi->txq.queue_id ||\n \t\t    !ice_vc_isvalid_q_id(vf, qci->vsi_id, qpi->txq.queue_id)) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto error_param;\n \t\t}\n \t\t/* copy Tx queue info from VF into VSI */\n@@ -1910,13 +1940,13 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)\n \t\tvsi->rx_rings[i]->dma = qpi->rxq.dma_ring_addr;\n \t\tvsi->rx_rings[i]->count = qpi->rxq.ring_len;\n \t\tif (qpi->rxq.databuffer_size > ((16 * 1024) - 128)) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto error_param;\n \t\t}\n \t\tvsi->rx_buf_len = qpi->rxq.databuffer_size;\n \t\tif (qpi->rxq.max_pkt_size >= (16 * 1024) ||\n \t\t    qpi->rxq.max_pkt_size < 64) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto error_param;\n \t\t}\n \t\tvsi->max_frame = qpi->rxq.max_pkt_size;\n@@ -1931,14 +1961,12 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg)\n \tvsi->tc_cfg.tc_info[0].qcount_tx = qci->num_queue_pairs;\n \tvsi->tc_cfg.tc_info[0].qcount_rx = qci->num_queue_pairs;\n \n-\tif (!ice_vsi_cfg_lan_txqs(vsi) && !ice_vsi_cfg_rxqs(vsi))\n-\t\taq_ret = 0;\n-\telse\n-\t\taq_ret = ICE_ERR_PARAM;\n+\tif (ice_vsi_cfg_lan_txqs(vsi) || ice_vsi_cfg_rxqs(vsi))\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n \n error_param:\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_VSI_QUEUES, aq_ret,\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_VSI_QUEUES, v_ret,\n \t\t\t\t     NULL, 0);\n }\n \n@@ -1980,11 +2008,11 @@ static bool ice_can_vf_change_mac(struct ice_vf *vf)\n static int\n ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_ether_addr_list *al =\n \t    (struct virtchnl_ether_addr_list *)msg;\n \tstruct ice_pf *pf = vf->pf;\n \tenum virtchnl_ops vc_op;\n-\tenum ice_status ret = 0;\n \tLIST_HEAD(mac_list);\n \tstruct ice_vsi *vsi;\n \tint mac_count = 0;\n@@ -1997,7 +2025,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states) ||\n \t    !ice_vc_isvalid_vsi_id(vf, al->vsi_id)) {\n-\t\tret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto handle_mac_exit;\n \t}\n \n@@ -2009,12 +2037,13 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \t\t/* There is no need to let VF know about not being trusted\n \t\t * to add more MAC addr, so we can just return success message.\n \t\t */\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto handle_mac_exit;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\tret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto handle_mac_exit;\n \t}\n \n@@ -2036,7 +2065,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \t\t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\t\"can't remove mac %pM for VF %d\\n\",\n \t\t\t\t\tmaddr, vf->vf_id);\n-\t\t\t\tret = ICE_ERR_PARAM;\n+\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\tgoto handle_mac_exit;\n \t\t\t}\n \t\t}\n@@ -2046,7 +2075,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\"invalid mac %pM provided for VF %d\\n\",\n \t\t\t\tmaddr, vf->vf_id);\n-\t\t\tret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto handle_mac_exit;\n \t\t}\n \n@@ -2055,13 +2084,13 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\"can't change unicast mac for untrusted VF %d\\n\",\n \t\t\t\tvf->vf_id);\n-\t\t\tret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tgoto handle_mac_exit;\n \t\t}\n \n \t\t/* get here if maddr is multicast or if VF can change mac */\n \t\tif (ice_add_mac_to_list(vsi, &mac_list, al->list[i].addr)) {\n-\t\t\tret = ICE_ERR_NO_MEMORY;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY;\n \t\t\tgoto handle_mac_exit;\n \t\t}\n \t\tmac_count++;\n@@ -2069,14 +2098,14 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n \n \t/* program the updated filter list */\n \tif (set)\n-\t\tret = ice_add_mac(&pf->hw, &mac_list);\n+\t\tv_ret = ice_err_to_virt_err(ice_add_mac(&pf->hw, &mac_list));\n \telse\n-\t\tret = ice_remove_mac(&pf->hw, &mac_list);\n+\t\tv_ret = ice_err_to_virt_err(ice_remove_mac(&pf->hw, &mac_list));\n \n-\tif (ret) {\n+\tif (v_ret) {\n \t\tdev_err(&pf->pdev->dev,\n \t\t\t\"can't update mac filters for VF %d, error %d\\n\",\n-\t\t\tvf->vf_id, ret);\n+\t\t\tvf->vf_id, v_ret);\n \t} else {\n \t\tif (set)\n \t\t\tvf->num_mac += mac_count;\n@@ -2087,7 +2116,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set)\n handle_mac_exit:\n \tice_free_fltr_list(&pf->pdev->dev, &mac_list);\n \t/* send the response to the VF */\n-\treturn ice_vc_send_msg_to_vf(vf, vc_op, ret, NULL, 0);\n+\treturn ice_vc_send_msg_to_vf(vf, vc_op, v_ret, NULL, 0);\n }\n \n /**\n@@ -2126,17 +2155,17 @@ static int ice_vc_del_mac_addr_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_vf_res_request *vfres =\n \t\t(struct virtchnl_vf_res_request *)msg;\n \tint req_queues = vfres->num_queue_pairs;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tint max_allowed_vf_queues;\n \tint tx_rx_queue_left;\n \tint cur_queues;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -2171,7 +2200,7 @@ static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg)\n error_param:\n \t/* send the response to the VF */\n \treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_REQUEST_QUEUES,\n-\t\t\t\t     aq_ret, (u8 *)vfres, sizeof(*vfres));\n+\t\t\t\t     v_ret, (u8 *)vfres, sizeof(*vfres));\n }\n \n /**\n@@ -2268,9 +2297,9 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,\n  */\n static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n {\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct virtchnl_vlan_filter_list *vfl =\n \t    (struct virtchnl_vlan_filter_list *)msg;\n-\tenum ice_status aq_ret = 0;\n \tstruct ice_pf *pf = vf->pf;\n \tbool vlan_promisc = false;\n \tstruct ice_vsi *vsi;\n@@ -2280,12 +2309,12 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \tint i;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (!ice_vc_isvalid_vsi_id(vf, vfl->vsi_id)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -2297,12 +2326,13 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\t/* There is no need to let VF know about being not trusted,\n \t\t * so we can just return success message here\n \t\t */\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tfor (i = 0; i < vfl->num_elements; i++) {\n \t\tif (vfl->vlan_id[i] > ICE_MAX_VLANID) {\n-\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\"invalid VF VLAN id %d\\n\", vfl->vlan_id[i]);\n \t\t\tgoto error_param;\n@@ -2312,12 +2342,12 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \thw = &pf->hw;\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (vsi->info.pvid) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -2325,7 +2355,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\tdev_err(&pf->pdev->dev,\n \t\t\t\"%sable VLAN stripping failed for VSI %i\\n\",\n \t\t\t add_v ? \"en\" : \"dis\", vsi->vsi_num);\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n@@ -2338,7 +2368,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\t\tu16 vid = vfl->vlan_id[i];\n \n \t\t\tif (ice_vsi_add_vlan(vsi, vid)) {\n-\t\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\tgoto error_param;\n \t\t\t}\n \n@@ -2347,7 +2377,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\t\tif (!vlan_promisc) {\n \t\t\t\tstatus = ice_cfg_vlan_pruning(vsi, true, false);\n \t\t\t\tif (status) {\n-\t\t\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\t\t\"Enable VLAN pruning on VLAN ID: %d failed error-%d\\n\",\n \t\t\t\t\t\tvid, status);\n@@ -2360,10 +2390,12 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \n \t\t\t\tstatus = ice_set_vsi_promisc(hw, vsi->idx,\n \t\t\t\t\t\t\t     promisc_m, vid);\n-\t\t\t\tif (status)\n+\t\t\t\tif (status) {\n+\t\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\t\t\"Enable Unicast/multicast promiscuous mode on VLAN ID:%d failed error-%d\\n\",\n \t\t\t\t\t\tvid, status);\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t} else {\n@@ -2374,7 +2406,7 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\t\t * updating VLAN information\n \t\t\t */\n \t\t\tif (ice_vsi_kill_vlan(vsi, vid)) {\n-\t\t\t\taq_ret = ICE_ERR_PARAM;\n+\t\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\t\t\tgoto error_param;\n \t\t\t}\n \n@@ -2396,10 +2428,10 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n error_param:\n \t/* send the response to the VF */\n \tif (add_v)\n-\t\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ADD_VLAN, aq_ret,\n+\t\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ADD_VLAN, v_ret,\n \t\t\t\t\t     NULL, 0);\n \telse\n-\t\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DEL_VLAN, aq_ret,\n+\t\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DEL_VLAN, v_ret,\n \t\t\t\t\t     NULL, 0);\n }\n \n@@ -2435,22 +2467,22 @@ static int ice_vc_remove_vlan_msg(struct ice_vf *vf, u8 *msg)\n  */\n static int ice_vc_ena_vlan_stripping(struct ice_vf *vf)\n {\n-\tenum ice_status aq_ret = 0;\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_vsi *vsi;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (ice_vsi_manage_vlan_stripping(vsi, true))\n-\t\taq_ret = ICE_ERR_AQ_ERROR;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \n error_param:\n \treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING,\n-\t\t\t\t     aq_ret, NULL, 0);\n+\t\t\t\t     v_ret, NULL, 0);\n }\n \n /**\n@@ -2461,27 +2493,27 @@ static int ice_vc_ena_vlan_stripping(struct ice_vf *vf)\n  */\n static int ice_vc_dis_vlan_stripping(struct ice_vf *vf)\n {\n-\tenum ice_status aq_ret = 0;\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n \tstruct ice_pf *pf = vf->pf;\n \tstruct ice_vsi *vsi;\n \n \tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!vsi) {\n-\t\taq_ret = ICE_ERR_PARAM;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \t\tgoto error_param;\n \t}\n \n \tif (ice_vsi_manage_vlan_stripping(vsi, false))\n-\t\taq_ret = ICE_ERR_AQ_ERROR;\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n \n error_param:\n \treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING,\n-\t\t\t\t     aq_ret, NULL, 0);\n+\t\t\t\t     v_ret, NULL, 0);\n }\n \n /**\n@@ -2517,7 +2549,7 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \t/* Perform basic checks on the msg */\n \terr = virtchnl_vc_validate_vf_msg(&vf->vf_ver, v_opcode, msg, msglen);\n \tif (err) {\n-\t\tif (err == VIRTCHNL_ERR_PARAM)\n+\t\tif (err == VIRTCHNL_STATUS_ERR_PARAM)\n \t\t\terr = -EPERM;\n \t\telse\n \t\t\terr = -EINVAL;\n@@ -2539,7 +2571,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \n error_handler:\n \tif (err) {\n-\t\tice_vc_send_msg_to_vf(vf, v_opcode, ICE_ERR_PARAM, NULL, 0);\n+\t\tice_vc_send_msg_to_vf(vf, v_opcode, VIRTCHNL_STATUS_ERR_PARAM,\n+\t\t\t\t      NULL, 0);\n \t\tdev_err(&pf->pdev->dev, \"Invalid message from VF %d, opcode %d, len %d, error %d\\n\",\n \t\t\tvf_id, v_opcode, msglen, err);\n \t\treturn;\n@@ -2602,7 +2635,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \tdefault:\n \t\tdev_err(&pf->pdev->dev, \"Unsupported opcode %d from VF %d\\n\",\n \t\t\tv_opcode, vf_id);\n-\t\terr = ice_vc_send_msg_to_vf(vf, v_opcode, ICE_ERR_NOT_IMPL,\n+\t\terr = ice_vc_send_msg_to_vf(vf, v_opcode,\n+\t\t\t\t\t    VIRTCHNL_STATUS_ERR_NOT_SUPPORTED,\n \t\t\t\t\t    NULL, 0);\n \t\tbreak;\n \t}\n@@ -2874,7 +2908,8 @@ int ice_set_vf_link_state(struct net_device *netdev, int vf_id, int link_state)\n \t\tice_set_pfe_link(vf, &pfe, ls->link_speed, vf->link_up);\n \n \t/* Notify the VF of its new link state */\n-\tice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT, 0, (u8 *)&pfe,\n+\tice_aq_send_msg_to_vf(hw, vf->vf_id, VIRTCHNL_OP_EVENT,\n+\t\t\t      VIRTCHNL_STATUS_SUCCESS, (u8 *)&pfe,\n \t\t\t      sizeof(pfe), NULL);\n \n \treturn 0;\n",
    "prefixes": [
        "S14",
        "13/15"
    ]
}