]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
i40e: remove error msg when vf with port vlan tries to remove vlan 0
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Thu, 28 Feb 2019 17:52:49 +0000 (09:52 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 May 2019 21:31:21 +0000 (14:31 -0700)
VF's attempt to delete vlan 0 when a port vlan is configured is harmless
in this case pf driver just does nothing.  If vf will try to remove
other vlans when a port vlan is configured it will still produce error
as before.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@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 71cd159e79020cec738dca2d9278c25ac139484a..24628de8e624d519c43b7e456b494af0e5ee13a8 100644 (file)
@@ -2766,7 +2766,8 @@ static int i40e_vc_remove_vlan_msg(struct i40e_vf *vf, u8 *msg)
 
        vsi = pf->vsi[vf->lan_vsi_idx];
        if (vsi->info.pvid) {
-               aq_ret = I40E_ERR_PARAM;
+               if (vfl->num_elements > 1 || vfl->vlan_id[0])
+                       aq_ret = I40E_ERR_PARAM;
                goto error_param;
        }