• Brett Creeley's avatar
    ice: Only allow tagged bcast/mcast traffic for VF in port VLAN · 72634bc2
    Brett Creeley authored
    Currently the VF can see other's broadcast and multicast traffic because
    it always has a VLAN filter for VLAN 0. Fix this by removing/adding the
    VF's VLAN 0 filter when a port VLAN is added/removed respectively.
    
    This required a few changes.
    
    1. Move where we add VLAN 0 by default for the VF into
    ice_alloc_vsi_res() because this is when we determine if a port VLAN is
    present for load and reset.
    
    2. Moved where we kill the old port VLAN filter in
    ice_set_vf_port_vlan() to the very end of the function because it allows
    us to save the old port VLAN configuration upon any failure case.
    
    3. During adding/removing of a port VLAN via ice_set_vf_port_vlan() we
    also need to remove/add the VLAN 0 filter rule respectively.
    
    4. Improve log messages.
    Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    72634bc2
ice_virtchnl_pf.c 91.8 KB