]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i40e: suppress bogus error message
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 26 Oct 2018 21:33:33 +0000 (14:33 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 14 Nov 2018 18:56:34 +0000 (10:56 -0800)
The i40e driver complains about unprivileged VFs trying to configure
promiscuous mode each time a VF reset occurs. This isn't the fault of
the poor VF driver - the PF driver itself is making the request.

To fix this, skip the privilege check if the request is to disable all
promiscuous activity. This gets rid of the bogus message, but doesn't
affect privilege checks, since we really only care if the unprivileged
VF is trying to enable promiscuous mode.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 8e0a247e7e5aa163215a90773a164f1d35057539..2ac23ebfbf31b4398aa0a6505fcd5815685a4d3e 100644 (file)
@@ -1112,7 +1112,8 @@ static i40e_status i40e_config_vf_promiscuous_mode(struct i40e_vf *vf,
        if (!i40e_vc_isvalid_vsi_id(vf, vsi_id) || !vsi)
                return I40E_ERR_PARAM;
 
-       if (!test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
+       if (!test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) &&
+           (allmulti || alluni)) {
                dev_err(&pf->pdev->dev,
                        "Unprivileged VF %d is attempting to configure promiscuous mode\n",
                        vf->vf_id);