Commit 79956b83 authored by Benjamin Mikailenko's avatar Benjamin Mikailenko Committed by Tony Nguyen

ice: Ignore error message when setting same promiscuous mode

Commit 1273f895 ("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: 1273f895 ("ice: Fix broken IFF_ALLMULTI handling")
Signed-off-by: default avatarBenjamin Mikailenko <benjamin.mikailenko@intel.com>
Signed-off-by: default avatarGrzegorz 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: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent abddafd4
...@@ -62,7 +62,7 @@ ice_fltr_set_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi, ...@@ -62,7 +62,7 @@ ice_fltr_set_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
int result; int result;
result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, false); 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), dev_err(ice_pf_to_dev(pf),
"Error setting promisc mode on VSI %i (rc=%d)\n", "Error setting promisc mode on VSI %i (rc=%d)\n",
vsi->vsi_num, result); vsi->vsi_num, result);
...@@ -86,7 +86,7 @@ ice_fltr_clear_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi, ...@@ -86,7 +86,7 @@ ice_fltr_clear_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
int result; int result;
result = ice_set_vlan_vsi_promisc(hw, vsi->idx, promisc_mask, true); 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), dev_err(ice_pf_to_dev(pf),
"Error clearing promisc mode on VSI %i (rc=%d)\n", "Error clearing promisc mode on VSI %i (rc=%d)\n",
vsi->vsi_num, result); vsi->vsi_num, result);
...@@ -109,7 +109,7 @@ ice_fltr_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, ...@@ -109,7 +109,7 @@ ice_fltr_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
int result; int result;
result = ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask, vid); result = ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask, vid);
if (result) if (result && result != -EEXIST)
dev_err(ice_pf_to_dev(pf), dev_err(ice_pf_to_dev(pf),
"Error clearing promisc mode on VSI %i for VID %u (rc=%d)\n", "Error clearing promisc mode on VSI %i for VID %u (rc=%d)\n",
ice_get_hw_vsi_num(hw, vsi_handle), vid, result); 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, ...@@ -132,7 +132,7 @@ ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
int result; int result;
result = ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid); result = ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid);
if (result) if (result && result != -EEXIST)
dev_err(ice_pf_to_dev(pf), dev_err(ice_pf_to_dev(pf),
"Error setting promisc mode on VSI %i for VID %u (rc=%d)\n", "Error setting promisc mode on VSI %i for VID %u (rc=%d)\n",
ice_get_hw_vsi_num(hw, vsi_handle), vid, result); ice_get_hw_vsi_num(hw, vsi_handle), vid, result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment