mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
ice: Ignore error message when setting same promiscuous mode
Commit1273f89578
("ice: Fix broken IFF_ALLMULTI handling") introduced new checks when setting/clearing promiscuous mode. But if the requested promiscuous mode setting already exists, an -EEXIST error message would be printed. This is incorrect because promiscuous mode is either on/off and shouldn't print an error when the requested configuration is already set. This can happen when removing a bridge with two bonded interfaces and promiscuous most isn't fully cleared from VLAN VSI in hardware. Fix this by ignoring cases where requested promiscuous mode exists. Fixes:1273f89578
("ice: Fix broken IFF_ALLMULTI handling") Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko@intel.com> Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com> Link: https://lore.kernel.org/all/CAK8fFZ7m-KR57M_rYX6xZN39K89O=LGooYkKsu6HKt0Bs+x6xQ@mail.gmail.com/ Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
abddafd458
commit
79956b83ed
@ -62,7 +62,7 @@ ice_fltr_set_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
|
||||
int result;
|
||||
|
||||
result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, false);
|
||||
if (result)
|
||||
if (result && result != -EEXIST)
|
||||
dev_err(ice_pf_to_dev(pf),
|
||||
"Error setting promisc mode on VSI %i (rc=%d)\n",
|
||||
vsi->vsi_num, result);
|
||||
@ -86,7 +86,7 @@ ice_fltr_clear_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
|
||||
int result;
|
||||
|
||||
result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, true);
|
||||
if (result)
|
||||
if (result && result != -EEXIST)
|
||||
dev_err(ice_pf_to_dev(pf),
|
||||
"Error clearing promisc mode on VSI %i (rc=%d)\n",
|
||||
vsi->vsi_num, result);
|
||||
@ -109,7 +109,7 @@ ice_fltr_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
|
||||
int result;
|
||||
|
||||
result = ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask, vid);
|
||||
if (result)
|
||||
if (result && result != -EEXIST)
|
||||
dev_err(ice_pf_to_dev(pf),
|
||||
"Error clearing promisc mode on VSI %i for VID %u (rc=%d)\n",
|
||||
ice_get_hw_vsi_num(hw, vsi_handle), vid, result);
|
||||
@ -132,7 +132,7 @@ ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
|
||||
int result;
|
||||
|
||||
result = ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid);
|
||||
if (result)
|
||||
if (result && result != -EEXIST)
|
||||
dev_err(ice_pf_to_dev(pf),
|
||||
"Error setting promisc mode on VSI %i for VID %u (rc=%d)\n",
|
||||
ice_get_hw_vsi_num(hw, vsi_handle), vid, result);
|
||||
|
Loading…
Reference in New Issue
Block a user