ice: sync netdev filters after clearing VSI
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Wed, 21 Dec 2022 11:38:19 +0000 (12:38 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 3 Feb 2023 17:54:18 +0000 (09:54 -0800)
In driver reload path the netdev isn't removed, but VSI is. Remove
filters on netdev right after removing them on VSI.

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_fltr.c

index 40e678cfb50784aacb3329c46e1a91e550ad0bad..aff7a141c30df49f3be6abc5d8d79e55c63cdfe4 100644 (file)
@@ -208,6 +208,11 @@ static int ice_fltr_remove_eth_list(struct ice_vsi *vsi, struct list_head *list)
 void ice_fltr_remove_all(struct ice_vsi *vsi)
 {
        ice_remove_vsi_fltr(&vsi->back->hw, vsi->idx);
+       /* sync netdev filters if exist */
+       if (vsi->netdev) {
+               __dev_uc_unsync(vsi->netdev, NULL);
+               __dev_mc_unsync(vsi->netdev, NULL);
+       }
 }
 
 /**