diff options
author | Akeem G Abodunrin <akeem.g.abodunrin@intel.com> | 2019-04-16 13:21:16 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-05-04 17:07:34 -0400 |
commit | bb877b22bcb5334fc4e1752fe77e96ab762c3738 (patch) | |
tree | 20a661059505572403e3e9f0c593780d0793abf0 /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | e80e76db6c5bbc7a8f8512f3dc630a2170745b0b (diff) |
ice: Don't remove VLAN filters that were never programmed
In case of non-trusted VFs, it is possible to program VLAN filter far
less than what is requested by the VF originally, thereby makes number of
VLAN elements being tracked by VF different from actual VLAN tags. This
patch makes sure that we are not attempting to remove VLAN filter that
does not exist.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@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>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 947730d74612..83d0aef7f77e 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -1616,7 +1616,11 @@ int ice_vsi_kill_vlan(struct ice_vsi *vsi, u16 vid) | |||
1616 | list_add(&list->list_entry, &tmp_add_list); | 1616 | list_add(&list->list_entry, &tmp_add_list); |
1617 | 1617 | ||
1618 | status = ice_remove_vlan(&pf->hw, &tmp_add_list); | 1618 | status = ice_remove_vlan(&pf->hw, &tmp_add_list); |
1619 | if (status) { | 1619 | if (status == ICE_ERR_DOES_NOT_EXIST) { |
1620 | dev_dbg(&pf->pdev->dev, | ||
1621 | "Failed to remove VLAN %d on VSI %i, it does not exist, status: %d\n", | ||
1622 | vid, vsi->vsi_num, status); | ||
1623 | } else if (status) { | ||
1620 | dev_err(&pf->pdev->dev, | 1624 | dev_err(&pf->pdev->dev, |
1621 | "Error removing VLAN %d on vsi %i error: %d\n", | 1625 | "Error removing VLAN %d on vsi %i error: %d\n", |
1622 | vid, vsi->vsi_num, status); | 1626 | vid, vsi->vsi_num, status); |