get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1313236,
    "url": "http://patchwork.ozlabs.org/api/patches/1313236/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200619171022.9539-2-haiyue.wang@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": "<20200619171022.9539-2-haiyue.wang@intel.com>",
    "list_archive_url": null,
    "date": "2020-06-19T17:10:18",
    "name": "[v2,1/5] ice: add the virtchnl handler for AdminQ command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "516a10dd600a16a44c9ed69fc52edb1efcf94f4f",
    "submitter": {
        "id": 79056,
        "url": "http://patchwork.ozlabs.org/api/people/79056/?format=api",
        "name": "Haiyue Wang",
        "email": "haiyue.wang@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/20200619171022.9539-2-haiyue.wang@intel.com/mbox/",
    "series": [
        {
            "id": 184628,
            "url": "http://patchwork.ozlabs.org/api/series/184628/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=184628",
            "date": "2020-06-19T17:10:17",
            "name": "ice: add Intel DCF mode support",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/184628/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1313236/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1313236/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49pQXq6skRz9sWn\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 20 Jun 2020 03:19:55 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B741F88F47;\n\tFri, 19 Jun 2020 17:19:53 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rMSlgTmpSzHZ; Fri, 19 Jun 2020 17:19:51 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 10F0888E4B;\n\tFri, 19 Jun 2020 17:19:51 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by ash.osuosl.org (Postfix) with ESMTP id 0FC971BF40D\n for <intel-wired-lan@lists.osuosl.org>; Fri, 19 Jun 2020 17:19:50 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by whitealder.osuosl.org (Postfix) with ESMTP id 094B488E4B\n for <intel-wired-lan@lists.osuosl.org>; Fri, 19 Jun 2020 17:19:50 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id crjnBqvvkBdC for <intel-wired-lan@lists.osuosl.org>;\n Fri, 19 Jun 2020 17:19:47 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by whitealder.osuosl.org (Postfix) with ESMTPS id 16B6988F36\n for <intel-wired-lan@lists.osuosl.org>; Fri, 19 Jun 2020 17:19:47 +0000 (UTC)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Jun 2020 10:19:46 -0700",
            "from npg-dpdk-haiyue-1.sh.intel.com ([10.67.119.213])\n by fmsmga005.fm.intel.com with ESMTP; 19 Jun 2020 10:19:45 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "IronPort-SDR": [
            "\n 66QN3g3/lamxd3ni1/O0CpzMeSUsK830E0PFSrr3vOlhEBNf5+nyL/S6jeIgDDXW6Jr54blcV0\n 8735/WP/C8CA==",
            "\n LkkGfATyZON3ayZuzATVes/2XtgenbC06DU+CiJCNXnNwZ7s/PQ70uTmR1d9ZTbeASW2yTNjKe\n gWWrN4Lg7e0g=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9657\"; a=\"141298894\"",
            "E=Sophos;i=\"5.75,256,1589266800\"; d=\"scan'208\";a=\"141298894\"",
            "E=Sophos;i=\"5.75,256,1589266800\"; d=\"scan'208\";a=\"477702838\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Haiyue Wang <haiyue.wang@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Sat, 20 Jun 2020 01:10:18 +0800",
        "Message-Id": "<20200619171022.9539-2-haiyue.wang@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200619171022.9539-1-haiyue.wang@intel.com>",
        "References": "<20200619045711.16055-1-haiyue.wang@intel.com>\n <20200619171022.9539-1-haiyue.wang@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH v2 1/5] ice: add the virtchnl handler for\n AdminQ command",
        "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 <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "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": "The DCF (Device Config Function) is a named trust VF (alway with ID 0,\nsingle entity per PF port) that can act as a sole controlling entity to\nexercise advance functionality such as adding switch rules for the rest\nof VFs.\n\nTo achieve this approach, this VF is permitted to send some basic AdminQ\ncommands to the PF through virtual channel (mailbox), then the PF driver\nsends these commands to the firmware, and returns the response to the VF\nagain through virtual channel.\n\nThe AdminQ command from DCF is split into two parts: one is the AdminQ\ndescriptor, the other is the buffer (the descriptor has BUF flag set).\nThese two parts should be sent in order, so that the PF can handle them\ncorrectly.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/net/ethernet/intel/ice/Makefile       |   2 +-\n drivers/net/ethernet/intel/ice/ice.h          |   2 +\n .../net/ethernet/intel/ice/ice_adminq_cmd.h   |   6 +\n drivers/net/ethernet/intel/ice/ice_dcf.c      |  49 +++++++\n drivers/net/ethernet/intel/ice/ice_dcf.h      |  20 +++\n .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 130 ++++++++++++++++++\n .../net/ethernet/intel/ice/ice_virtchnl_pf.h  |   1 +\n include/linux/avf/virtchnl.h                  |  10 ++\n 8 files changed, 219 insertions(+), 1 deletion(-)\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcf.c\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcf.h",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile\nindex 980bbcc64b4b..eb83b5fe11c3 100644\n--- a/drivers/net/ethernet/intel/ice/Makefile\n+++ b/drivers/net/ethernet/intel/ice/Makefile\n@@ -24,7 +24,7 @@ ice-y := ice_main.o\t\\\n \t ice_flow.o\t\\\n \t ice_devlink.o\t\\\n \t ice_ethtool.o\n-ice-$(CONFIG_PCI_IOV) += ice_virtchnl_pf.o ice_sriov.o\n+ice-$(CONFIG_PCI_IOV) += ice_virtchnl_pf.o ice_sriov.o ice_dcf.o\n ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_nl.o ice_dcb_lib.o\n ice-$(CONFIG_RFS_ACCEL) += ice_arfs.o\n ice-$(CONFIG_XDP_SOCKETS) += ice_xsk.o\ndiff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 7486d010a619..a6e419a3f547 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -435,6 +435,8 @@ struct ice_pf {\n \tu32 tx_timeout_recovery_level;\n \tchar int_name[ICE_INT_NAME_STR_LEN];\n \tu32 sw_int_count;\n+\n+\tstruct ice_dcf dcf;\n };\n \n struct ice_netdev_priv {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\nindex 92f82f2a8af4..90d679ef7502 100644\n--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n@@ -1868,6 +1868,12 @@ enum ice_adminq_opc {\n \tice_aqc_opc_update_vsi\t\t\t\t= 0x0211,\n \tice_aqc_opc_free_vsi\t\t\t\t= 0x0213,\n \n+\t/* recipe commands */\n+\tice_aqc_opc_add_recipe\t\t\t\t= 0x0290,\n+\tice_aqc_opc_recipe_to_profile\t\t\t= 0x0291,\n+\tice_aqc_opc_get_recipe\t\t\t\t= 0x0292,\n+\tice_aqc_opc_get_recipe_to_profile\t\t= 0x0293,\n+\n \t/* switch rules population commands */\n \tice_aqc_opc_add_sw_rules\t\t\t= 0x02A0,\n \tice_aqc_opc_update_sw_rules\t\t\t= 0x02A1,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcf.c b/drivers/net/ethernet/intel/ice/ice_dcf.c\nnew file mode 100644\nindex 000000000000..cbe60a0cb2d2\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcf.c\n@@ -0,0 +1,49 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/* Copyright (C) 2018-2020, Intel Corporation. */\n+\n+#include \"ice.h\"\n+\n+static const enum ice_adminq_opc aqc_permitted_tbl[] = {\n+\t/* Generic Firmware Admin commands */\n+\tice_aqc_opc_get_ver,\n+\tice_aqc_opc_req_res,\n+\tice_aqc_opc_release_res,\n+\tice_aqc_opc_list_func_caps,\n+\tice_aqc_opc_list_dev_caps,\n+\n+\t/* Package Configuration Admin Commands */\n+\tice_aqc_opc_update_pkg,\n+\tice_aqc_opc_get_pkg_info_list,\n+\n+\t/* PHY commands */\n+\tice_aqc_opc_get_phy_caps,\n+\tice_aqc_opc_get_link_status,\n+\n+\t/* Switch Block */\n+\tice_aqc_opc_get_sw_cfg,\n+\tice_aqc_opc_alloc_res,\n+\tice_aqc_opc_free_res,\n+\tice_aqc_opc_add_recipe,\n+\tice_aqc_opc_recipe_to_profile,\n+\tice_aqc_opc_get_recipe,\n+\tice_aqc_opc_get_recipe_to_profile,\n+\tice_aqc_opc_add_sw_rules,\n+\tice_aqc_opc_update_sw_rules,\n+\tice_aqc_opc_remove_sw_rules,\n+};\n+\n+/**\n+ * ice_dcf_aq_cmd_permitted - validate the AdminQ command permitted or not\n+ * @desc: descriptor describing the command\n+ */\n+bool ice_dcf_aq_cmd_permitted(struct ice_aq_desc *desc)\n+{\n+\tu16 opc = le16_to_cpu(desc->opcode);\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(aqc_permitted_tbl); i++)\n+\t\tif (opc == aqc_permitted_tbl[i])\n+\t\t\treturn true;\n+\n+\treturn false;\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcf.h b/drivers/net/ethernet/intel/ice/ice_dcf.h\nnew file mode 100644\nindex 000000000000..9edb2d5d9d8f\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcf.h\n@@ -0,0 +1,20 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright (C) 2018-2020, Intel Corporation. */\n+\n+#ifndef _ICE_DCF_H_\n+#define _ICE_DCF_H_\n+\n+struct ice_dcf {\n+\t/* Handle the AdminQ command between the DCF (Device Config Function)\n+\t * and the firmware.\n+\t */\n+#define ICE_DCF_AQ_DESC_TIMEOUT\t(HZ / 10)\n+\tstruct ice_aq_desc aq_desc;\n+\tu8 aq_desc_received;\n+\tunsigned long aq_desc_expires;\n+};\n+\n+#ifdef CONFIG_PCI_IOV\n+bool ice_dcf_aq_cmd_permitted(struct ice_aq_desc *desc);\n+#endif /* CONFIG_PCI_IOV */\n+#endif /* _ICE_DCF_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex a368a89b25f3..ca0d4dd5953c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -3651,6 +3651,130 @@ static int ice_vf_init_vlan_stripping(struct ice_vf *vf)\n \t\treturn ice_vsi_manage_vlan_stripping(vsi, false);\n }\n \n+/**\n+ * ice_dcf_handle_aq_cmd - handle the AdminQ command from DCF to FW\n+ * @vf: pointer to the VF info\n+ * @aq_desc: the AdminQ command descriptor\n+ * @aq_buf: the AdminQ command buffer if aq_buf_size is non-zero\n+ * @aq_buf_size: the AdminQ command buffer size\n+ *\n+ * The VF splits the AdminQ command into two parts: one is the descriptor of\n+ * AdminQ command, the other is the buffer of AdminQ command (the descriptor\n+ * has BUF flag set). When both of them are received by PF, this function will\n+ * forward them to firmware once to get the AdminQ's response. And also, the\n+ * filled descriptor and buffer of the response will be sent back to VF one by\n+ * one through the virtchnl.\n+ */\n+static int\n+ice_dcf_handle_aq_cmd(struct ice_vf *vf, struct ice_aq_desc *aq_desc,\n+\t\t      u8 *aq_buf, u16 aq_buf_size)\n+{\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n+\tstruct ice_pf *pf = vf->pf;\n+\tenum virtchnl_ops v_op;\n+\tenum ice_status aq_ret;\n+\tu16 v_msg_len = 0;\n+\tu8 *v_msg = NULL;\n+\tint ret;\n+\n+\tpf->dcf.aq_desc_received = false;\n+\n+\tif ((aq_buf && !aq_buf_size) || (!aq_buf && aq_buf_size))\n+\t\treturn -EINVAL;\n+\n+\taq_ret = ice_aq_send_cmd(&pf->hw, aq_desc, aq_buf, aq_buf_size, NULL);\n+\t/* It needs to send back the AQ response message if ICE_ERR_AQ_ERROR\n+\t * returns, some AdminQ handlers will use the error code filled by FW\n+\t * to do exception handling.\n+\t */\n+\tif (aq_ret && aq_ret != ICE_ERR_AQ_ERROR) {\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n+\t\tv_op = VIRTCHNL_OP_DCF_CMD_DESC;\n+\t\tgoto err;\n+\t}\n+\n+\tret = ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DCF_CMD_DESC, v_ret,\n+\t\t\t\t    (u8 *)aq_desc, sizeof(*aq_desc));\n+\t/* Bail out so we don't send the VIRTCHNL_OP_DCF_CMD_BUFF message\n+\t * below if failure happens or no AdminQ command buffer.\n+\t */\n+\tif (ret || !aq_buf_size)\n+\t\treturn ret;\n+\n+\tv_op = VIRTCHNL_OP_DCF_CMD_BUFF;\n+\tv_msg_len = le16_to_cpu(aq_desc->datalen);\n+\n+\t/* buffer is not updated if data length exceeds buffer size */\n+\tif (v_msg_len > aq_buf_size)\n+\t\tv_msg_len = 0;\n+\telse if (v_msg_len)\n+\t\tv_msg = aq_buf;\n+\n+\t/* send the response back to the VF */\n+err:\n+\treturn ice_vc_send_msg_to_vf(vf, v_op, v_ret, v_msg, v_msg_len);\n+}\n+\n+/**\n+ * ice_vc_dcf_cmd_desc_msg - handle the DCF AdminQ command descriptor\n+ * @vf: pointer to the VF info\n+ * @msg: pointer to the msg buffer which holds the command descriptor\n+ * @len: length of the message\n+ */\n+static int ice_vc_dcf_cmd_desc_msg(struct ice_vf *vf, u8 *msg, u16 len)\n+{\n+\tstruct ice_aq_desc *aq_desc = (struct ice_aq_desc *)msg;\n+\tstruct ice_pf *pf = vf->pf;\n+\n+\tif (len != sizeof(*aq_desc) || !ice_dcf_aq_cmd_permitted(aq_desc)) {\n+\t\t/* In case to avoid the VIRTCHNL_OP_DCF_CMD_DESC message with\n+\t\t * the ICE_AQ_FLAG_BUF set followed by another bad message\n+\t\t * VIRTCHNL_OP_DCF_CMD_DESC.\n+\t\t */\n+\t\tpf->dcf.aq_desc_received = false;\n+\t\tgoto err;\n+\t}\n+\n+\t/* The AdminQ descriptor needs to be stored for use when the followed\n+\t * VIRTCHNL_OP_DCF_CMD_BUFF is received.\n+\t */\n+\tif (aq_desc->flags & cpu_to_le16(ICE_AQ_FLAG_BUF)) {\n+\t\tpf->dcf.aq_desc = *aq_desc;\n+\t\tpf->dcf.aq_desc_received = true;\n+\t\tpf->dcf.aq_desc_expires = jiffies + ICE_DCF_AQ_DESC_TIMEOUT;\n+\t\treturn 0;\n+\t}\n+\n+\treturn ice_dcf_handle_aq_cmd(vf, aq_desc, NULL, 0);\n+\n+\t/* send the response back to the VF */\n+err:\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DCF_CMD_DESC,\n+\t\t\t\t     VIRTCHNL_STATUS_ERR_PARAM, NULL, 0);\n+}\n+\n+/**\n+ * ice_vc_dcf_cmd_buff_msg - handle the DCF AdminQ command buffer\n+ * @vf: pointer to the VF info\n+ * @msg: pointer to the msg buffer which holds the command buffer\n+ * @len: length of the message\n+ */\n+static int ice_vc_dcf_cmd_buff_msg(struct ice_vf *vf, u8 *msg, u16 len)\n+{\n+\tstruct ice_pf *pf = vf->pf;\n+\n+\tif (!len || !pf->dcf.aq_desc_received ||\n+\t    time_is_before_jiffies(pf->dcf.aq_desc_expires))\n+\t\tgoto err;\n+\n+\treturn ice_dcf_handle_aq_cmd(vf, &pf->dcf.aq_desc, msg, len);\n+\n+\t/* send the response back to the VF */\n+err:\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DCF_CMD_BUFF,\n+\t\t\t\t     VIRTCHNL_STATUS_ERR_PARAM, NULL, 0);\n+}\n+\n /**\n  * ice_vc_process_vf_msg - Process request from VF\n  * @pf: pointer to the PF structure\n@@ -3761,6 +3885,12 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \tcase VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:\n \t\terr = ice_vc_dis_vlan_stripping(vf);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_DCF_CMD_DESC:\n+\t\terr = ice_vc_dcf_cmd_desc_msg(vf, msg, msglen);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_DCF_CMD_BUFF:\n+\t\terr = ice_vc_dcf_cmd_buff_msg(vf, msg, msglen);\n+\t\tbreak;\n \tcase VIRTCHNL_OP_UNKNOWN:\n \tdefault:\n \t\tdev_err(dev, \"Unsupported opcode %d from VF %d\\n\", v_opcode,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\nindex 67aa9110fdd1..4a257415f6a5 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n@@ -4,6 +4,7 @@\n #ifndef _ICE_VIRTCHNL_PF_H_\n #define _ICE_VIRTCHNL_PF_H_\n #include \"ice.h\"\n+#include \"ice_dcf.h\"\n \n /* Restrict number of MAC Addr and VLAN that non-trusted VF can programmed */\n #define ICE_MAX_VLAN_PER_VF\t\t8\ndiff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h\nindex a13690c3cc94..fa9a3a047dd4 100644\n--- a/include/linux/avf/virtchnl.h\n+++ b/include/linux/avf/virtchnl.h\n@@ -136,6 +136,9 @@ enum virtchnl_ops {\n \tVIRTCHNL_OP_DISABLE_CHANNELS = 31,\n \tVIRTCHNL_OP_ADD_CLOUD_FILTER = 32,\n \tVIRTCHNL_OP_DEL_CLOUD_FILTER = 33,\n+\t/* opcode 34, 35, 36, 37 and 38 are reserved */\n+\tVIRTCHNL_OP_DCF_CMD_DESC = 39,\n+\tVIRTCHNL_OP_DCF_CMD_BUFF = 40,\n \t/* New major set of opcodes introduced and so leaving room for\n \t * old misc opcodes to be added in future. Also these opcodes may only\n \t * be used if both the PF and VF have successfully negotiated the\n@@ -1262,6 +1265,13 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,\n \tcase VIRTCHNL_OP_DEL_CLOUD_FILTER:\n \t\tvalid_len = sizeof(struct virtchnl_filter);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_DCF_CMD_DESC:\n+\tcase VIRTCHNL_OP_DCF_CMD_BUFF:\n+\t\t/* These two opcodes are specific to handle the AdminQ command,\n+\t\t * so the validation needs to be done in PF's context.\n+\t\t */\n+\t\tvalid_len = msglen;\n+\t\tbreak;\n \tcase VIRTCHNL_OP_GET_CAPS:\n \t\tvalid_len = sizeof(struct virtchnl_get_capabilities);\n \t\tbreak;\n",
    "prefixes": [
        "v2",
        "1/5"
    ]
}