]> www.infradead.org Git - users/willy/pagecache.git/commit
ice: clear port vlan config during reset
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Fri, 6 Sep 2024 12:57:06 +0000 (14:57 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 30 Sep 2024 21:23:31 +0000 (14:23 -0700)
commitd019b1a9128d65956f04679ec2bb8b0800f13358
treec15d85135a1b4082aeff3383356d7a4276bf2e24
parentd517cf89874c6039e6294b18d66f40988e62502a
ice: clear port vlan config during reset

Since commit 2a2cb4c6c181 ("ice: replace ice_vf_recreate_vsi() with
ice_vf_reconfig_vsi()") VF VSI is only reconfigured instead of
recreated. The context configuration from previous setting is still the
same. If any of the config needs to be cleared it needs to be cleared
explicitly.

Previously there was assumption that port vlan will be cleared
automatically. Now, when VSI is only reconfigured we have to do it in the
code.

Not clearing port vlan configuration leads to situation when the driver
VSI config is different than the VSI config in HW. Traffic can't be
passed after setting and clearing port vlan, because of invalid VSI
config in HW.

Example reproduction:
> ip a a dev $(VF) $(VF_IP_ADDRESS)
> ip l s dev $(VF) up
> ping $(VF_IP_ADDRESS)
ping is working fine here
> ip link set eth5 vf 0 vlan 100
> ip link set eth5 vf 0 vlan 0
> ping $(VF_IP_ADDRESS)
ping isn't working

Fixes: 2a2cb4c6c181 ("ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi()")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Piotr Tyda <piotr.tyda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_vf_lib.c
drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c
drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.h