get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1285690,
    "url": "http://patchwork.ozlabs.org/api/patches/1285690/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200508004113.39725-1-anthony.l.nguyen@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": "<20200508004113.39725-1-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2020-05-08T00:40:59",
    "name": "[S41,01/15] ice: Add VF promiscuous support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ac7ab7eb1a2afea3bf0537de7a8e03caea5c4e73",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20200508004113.39725-1-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 175527,
            "url": "http://patchwork.ozlabs.org/api/series/175527/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=175527",
            "date": "2020-05-08T00:41:10",
            "name": "[S41,01/15] ice: Add VF promiscuous support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/175527/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1285690/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1285690/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 49JBQn28tvz9sSW\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2020 10:43:45 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id AE8A0878B7;\n\tFri,  8 May 2020 00:43:43 +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 1zhQdMJUVJqx; Fri,  8 May 2020 00:43:38 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EBC7D878A6;\n\tFri,  8 May 2020 00:43:37 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by ash.osuosl.org (Postfix) with ESMTP id 380961BF2C4\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:36 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by whitealder.osuosl.org (Postfix) with ESMTP id 350C787EAF\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:36 +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 TdkUUpFlwH69 for <intel-wired-lan@lists.osuosl.org>;\n Fri,  8 May 2020 00:43:34 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by whitealder.osuosl.org (Postfix) with ESMTPS id 112E687871\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:34 +0000 (UTC)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 May 2020 17:43:33 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.241.65])\n by orsmga007.jf.intel.com with ESMTP; 07 May 2020 17:43:33 -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 fJu+tAazZVHUBG2O3U8AFMUimyItEdHVp1/1NUWKZ/j/eIBmIA6xdPKgJ0WxO5gn25wENjojva\n BJogdLytjrEg==",
            "\n fn5BJcGfQGVTIXER7JHiTfua4LECKERmOth0v4uHiFtlNL4mMd0EziRrDxrlC73LlxlgowxfZM\n nLvWdLBYGUIg=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,365,1583222400\"; d=\"scan'208\";a=\"249468766\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  7 May 2020 17:40:59 -0700",
        "Message-Id": "<20200508004113.39725-1-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S41 01/15] ice: Add VF promiscuous support",
        "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": "From: Brett Creeley <brett.creeley@intel.com>\n\nImplement promiscuous support for VF VSIs. Behaviour of promiscuous support\nis based on VF trust as well as the, introduced, vf-true-promisc flag.\n\nA trusted VF with vf-true-promisc disabled will be the default VSI, which\nmeans that all traffic without a matching destination MAC address in the\ndevice's internal switch will be forwarded to this VF VSI.\n\nA trusted VF with vf-true-promisc enabled will go into \"true promiscuous\nmode\". This amounts to the VF receiving all ingress and egress traffic\nthat hits the device's internal switch.\n\nAn untrusted VF will only receive traffic destined for that VF.\n\nThe vf-true-promisc-support flag cannot be toggled while any VF is in\npromiscuous mode. This flag should be set prior to loading the iavf driver\nor spawning VF(s).\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h          |   1 +\n drivers/net/ethernet/intel/ice/ice_ethtool.c  |  12 +\n .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 206 +++++++++++++++++-\n .../net/ethernet/intel/ice/ice_virtchnl_pf.h  |   6 +\n 4 files changed, 223 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex f4f23a0a9b89..2dcbb60060f1 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -351,6 +351,7 @@ enum ice_pf_flags {\n \tICE_FLAG_FW_LLDP_AGENT,\n \tICE_FLAG_ETHTOOL_CTXT,\t\t/* set when ethtool holds RTNL lock */\n \tICE_FLAG_LEGACY_RX,\n+\tICE_FLAG_VF_TRUE_PROMISC_ENA,\n \tICE_FLAG_MDD_AUTO_RESET_VF,\n \tICE_PF_FLAGS_NBITS\t\t/* must be last */\n };\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex 593fb37bd59e..66d0bcc51ad9 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -157,6 +157,8 @@ struct ice_priv_flag {\n static const struct ice_priv_flag ice_gstrings_priv_flags[] = {\n \tICE_PRIV_FLAG(\"link-down-on-close\", ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA),\n \tICE_PRIV_FLAG(\"fw-lldp-agent\", ICE_FLAG_FW_LLDP_AGENT),\n+\tICE_PRIV_FLAG(\"vf-true-promisc-support\",\n+\t\t      ICE_FLAG_VF_TRUE_PROMISC_ENA),\n \tICE_PRIV_FLAG(\"mdd-auto-reset-vf\", ICE_FLAG_MDD_AUTO_RESET_VF),\n \tICE_PRIV_FLAG(\"legacy-rx\", ICE_FLAG_LEGACY_RX),\n };\n@@ -1308,6 +1310,16 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)\n \t\tice_down(vsi);\n \t\tice_up(vsi);\n \t}\n+\t/* don't allow modification of this flag when a single VF is in\n+\t * promiscuous mode because it's not supported\n+\t */\n+\tif (test_bit(ICE_FLAG_VF_TRUE_PROMISC_ENA, change_flags) &&\n+\t    ice_is_any_vf_in_promisc(pf)) {\n+\t\tdev_err(dev, \"Changing vf-true-promisc-support flag while VF(s) are in promiscuous mode not supported\\n\");\n+\t\t/* toggle bit back to previous state */\n+\t\tchange_bit(ICE_FLAG_VF_TRUE_PROMISC_ENA, pf->flags);\n+\t\tret = -EAGAIN;\n+\t}\n \tclear_bit(ICE_FLAG_ETHTOOL_CTXT, pf->flags);\n \treturn ret;\n }\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex 1aac440f199b..8a909b9df342 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -34,6 +34,37 @@ static int ice_check_vf_init(struct ice_pf *pf, struct ice_vf *vf)\n \treturn 0;\n }\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@@ -2034,6 +2065,173 @@ int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena)\n \treturn ret;\n }\n \n+/**\n+ * ice_is_any_vf_in_promisc - check if any VF(s) are in promiscuous mode\n+ * @pf: PF structure for accessing VF(s)\n+ *\n+ * Return false if no VF(s) are in unicast and/or multicast promiscuous mode,\n+ * else return true\n+ */\n+bool ice_is_any_vf_in_promisc(struct ice_pf *pf)\n+{\n+\tint vf_idx;\n+\n+\tice_for_each_vf(pf, vf_idx) {\n+\t\tstruct ice_vf *vf = &pf->vf[vf_idx];\n+\n+\t\t/* found a VF that has promiscuous mode configured */\n+\t\tif (test_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states) ||\n+\t\t    test_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states))\n+\t\t\treturn true;\n+\t}\n+\n+\treturn false;\n+}\n+\n+/**\n+ * ice_vc_cfg_promiscuous_mode_msg\n+ * @vf: pointer to the VF info\n+ * @msg: pointer to the msg buffer\n+ *\n+ * called from the VF to configure VF VSIs promiscuous mode\n+ */\n+static int ice_vc_cfg_promiscuous_mode_msg(struct ice_vf *vf, u8 *msg)\n+{\n+\tenum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;\n+\tstruct virtchnl_promisc_info *info =\n+\t    (struct virtchnl_promisc_info *)msg;\n+\tstruct ice_pf *pf = vf->pf;\n+\tstruct ice_vsi *vsi;\n+\tstruct device *dev;\n+\tbool rm_promisc;\n+\tint ret = 0;\n+\n+\tif (!test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) {\n+\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\tgoto error_param;\n+\t}\n+\n+\tif (!ice_vc_isvalid_vsi_id(vf, info->vsi_id)) {\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\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\tgoto error_param;\n+\t}\n+\n+\tdev = ice_pf_to_dev(pf);\n+\tif (!test_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {\n+\t\tdev_err(dev, \"Unprivileged VF %d is attempting to configure promiscuous mode\\n\",\n+\t\t\tvf->vf_id);\n+\t\t/* Leave v_ret alone, lie to the VF on purpose. */\n+\t\tgoto error_param;\n+\t}\n+\n+\trm_promisc = !(info->flags & FLAG_VF_UNICAST_PROMISC) &&\n+\t\t!(info->flags & FLAG_VF_MULTICAST_PROMISC);\n+\n+\tif (vsi->num_vlan || vf->port_vlan_info) {\n+\t\tstruct ice_vsi *pf_vsi = ice_get_main_vsi(pf);\n+\t\tstruct net_device *pf_netdev;\n+\n+\t\tif (!pf_vsi) {\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\t\tgoto error_param;\n+\t\t}\n+\n+\t\tpf_netdev = pf_vsi->netdev;\n+\n+\t\tret = ice_set_vf_spoofchk(pf_netdev, vf->vf_id, rm_promisc);\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"Failed to update spoofchk to %s for VF %d VSI %d when setting promiscuous mode\\n\",\n+\t\t\t\trm_promisc ? \"ON\" : \"OFF\", vf->vf_id,\n+\t\t\t\tvsi->vsi_num);\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\t}\n+\n+\t\tret = ice_cfg_vlan_pruning(vsi, true, !rm_promisc);\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"Failed to configure VLAN pruning in promiscuous mode\\n\");\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_PARAM;\n+\t\t\tgoto error_param;\n+\t\t}\n+\t}\n+\n+\tif (!test_bit(ICE_FLAG_VF_TRUE_PROMISC_ENA, pf->flags)) {\n+\t\tbool set_dflt_vsi = !!(info->flags & FLAG_VF_UNICAST_PROMISC);\n+\n+\t\tif (set_dflt_vsi && !ice_is_dflt_vsi_in_use(pf->first_sw))\n+\t\t\t/* only attempt to set the default forwarding VSI if\n+\t\t\t * it's not currently set\n+\t\t\t */\n+\t\t\tret = ice_set_dflt_vsi(pf->first_sw, vsi);\n+\t\telse if (!set_dflt_vsi &&\n+\t\t\t ice_is_vsi_dflt_vsi(pf->first_sw, vsi))\n+\t\t\t/* only attempt to free the default forwarding VSI if we\n+\t\t\t * are the owner\n+\t\t\t */\n+\t\t\tret = ice_clear_dflt_vsi(pf->first_sw);\n+\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"%sable VF %d as the default VSI failed, error %d\\n\",\n+\t\t\t\tset_dflt_vsi ? \"en\" : \"dis\", vf->vf_id, ret);\n+\t\t\tv_ret = VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR;\n+\t\t\tgoto error_param;\n+\t\t}\n+\t} else {\n+\t\tenum ice_status status;\n+\t\tu8 promisc_m;\n+\n+\t\tif (info->flags & FLAG_VF_UNICAST_PROMISC) {\n+\t\t\tif (vf->port_vlan_info || vsi->num_vlan)\n+\t\t\t\tpromisc_m = ICE_UCAST_VLAN_PROMISC_BITS;\n+\t\t\telse\n+\t\t\t\tpromisc_m = ICE_UCAST_PROMISC_BITS;\n+\t\t} else if (info->flags & FLAG_VF_MULTICAST_PROMISC) {\n+\t\t\tif (vf->port_vlan_info || vsi->num_vlan)\n+\t\t\t\tpromisc_m = ICE_MCAST_VLAN_PROMISC_BITS;\n+\t\t\telse\n+\t\t\t\tpromisc_m = ICE_MCAST_PROMISC_BITS;\n+\t\t} else {\n+\t\t\tif (vf->port_vlan_info || vsi->num_vlan)\n+\t\t\t\tpromisc_m = ICE_UCAST_VLAN_PROMISC_BITS;\n+\t\t\telse\n+\t\t\t\tpromisc_m = ICE_UCAST_PROMISC_BITS;\n+\t\t}\n+\n+\t\t/* Configure multicast/unicast with or without VLAN promiscuous\n+\t\t * mode\n+\t\t */\n+\t\tstatus = ice_vf_set_vsi_promisc(vf, vsi, promisc_m, rm_promisc);\n+\t\tif (status) {\n+\t\t\tdev_err(dev, \"%sable Tx/Rx filter promiscuous mode on VF-%d failed, error: %d\\n\",\n+\t\t\t\trm_promisc ? \"dis\" : \"en\", vf->vf_id, status);\n+\t\t\tv_ret = ice_err_to_virt_err(status);\n+\t\t\tgoto error_param;\n+\t\t} else {\n+\t\t\tdev_dbg(dev, \"%sable Tx/Rx filter promiscuous mode on VF-%d succeeded\\n\",\n+\t\t\t\trm_promisc ? \"dis\" : \"en\", vf->vf_id);\n+\t\t}\n+\t}\n+\n+\tif (info->flags & FLAG_VF_MULTICAST_PROMISC)\n+\t\tset_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states);\n+\telse\n+\t\tclear_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states);\n+\n+\tif (info->flags & FLAG_VF_UNICAST_PROMISC)\n+\t\tset_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states);\n+\telse\n+\t\tclear_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states);\n+\n+error_param:\n+\treturn ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE,\n+\t\t\t\t     v_ret, NULL, 0);\n+}\n+\n /**\n  * ice_vc_get_stats_msg\n  * @vf: pointer to the VF info\n@@ -2966,8 +3164,9 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)\n \t\tgoto error_param;\n \t}\n \n-\tif (test_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states) ||\n-\t    test_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states))\n+\tif ((test_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states) ||\n+\t     test_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states)) &&\n+\t    test_bit(ICE_FLAG_VF_TRUE_PROMISC_ENA, pf->flags))\n \t\tvlan_promisc = true;\n \n \tif (add_v) {\n@@ -3322,6 +3521,9 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)\n \tcase VIRTCHNL_OP_GET_STATS:\n \t\terr = ice_vc_get_stats_msg(vf, msg);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE:\n+\t\terr = ice_vc_cfg_promiscuous_mode_msg(vf, msg);\n+\t\tbreak;\n \tcase VIRTCHNL_OP_ADD_VLAN:\n \t\terr = ice_vc_add_vlan_msg(vf, msg);\n \t\tbreak;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\nindex 3f9464269bd2..f7fd1188efa4 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n@@ -128,6 +128,7 @@ void ice_set_vf_state_qs_dis(struct ice_vf *vf);\n int\n ice_get_vf_stats(struct net_device *netdev, int vf_id,\n \t\t struct ifla_vf_stats *vf_stats);\n+bool ice_is_any_vf_in_promisc(struct ice_pf *pf);\n void\n ice_vf_lan_overflow_event(struct ice_pf *pf, struct ice_rq_event_info *event);\n void ice_print_vfs_mdd_events(struct ice_pf *pf);\n@@ -219,5 +220,10 @@ ice_get_vf_stats(struct net_device __always_unused *netdev,\n {\n \treturn -EOPNOTSUPP;\n }\n+\n+static inline bool ice_is_any_vf_in_promisc(struct ice_pf __always_unused *pf)\n+{\n+\treturn false;\n+}\n #endif /* CONFIG_PCI_IOV */\n #endif /* _ICE_VIRTCHNL_PF_H_ */\n",
    "prefixes": [
        "S41",
        "01/15"
    ]
}