]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ice: Restore VLAN switch rule if port VLAN existed before
authorMichal Swiatkowski <michal.swiatkowski@intel.com>
Wed, 27 Feb 2019 00:35:21 +0000 (16:35 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 25 Mar 2019 14:41:49 +0000 (07:41 -0700)
The VLAN rule is lost when VM starts or the AVF driver (iavf.ko) is
reloaded. So it is necessary to add this rule again.

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

index c725fb8e81bfd2b2396897d47095066464cb9416..011c52a9442c56b9b789ff5c02bed47d5bf5997e 100644 (file)
@@ -457,8 +457,10 @@ static int ice_alloc_vsi_res(struct ice_vf *vf)
        vsi->hw_base_vector += 1;
 
        /* Check if port VLAN exist before, and restore it accordingly */
-       if (vf->port_vlan_id)
+       if (vf->port_vlan_id) {
                ice_vsi_manage_pvid(vsi, vf->port_vlan_id, true);
+               ice_vsi_add_vlan(vsi, vf->port_vlan_id & ICE_VLAN_M);
+       }
 
        eth_broadcast_addr(broadcast);