Skip to content

Commit

Permalink
net/ice/base: fix double VLAN in promiscuous mode
Browse files Browse the repository at this point in the history
[ upstream commit 40ff47d ]

Avoid enabling or disabling vlan 0 when trying to set promiscuous
vlan mode if double vlan mode is enabled. This fix is needed
because the driver tries to add the vlan 0 filter twice (once for
inner and once for outer) when double VLAN mode is enabled. The
filter program is rejected by the firmware when double vlan is
enabled, because the promiscuous filter only needs to be set once.

This issue was missed in the initial implementation of double vlan
mode.

Fixes: 60ff6f5 ("net/ice/base: consolidate VF promiscuous mode")

Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
  • Loading branch information
qzhan16 authored and kevintraynor committed Oct 11, 2022
1 parent b1f7933 commit da3be8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ice/base/ice_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -6215,6 +6215,13 @@ _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,

LIST_FOR_EACH_ENTRY(list_itr, &vsi_list_head, ice_fltr_list_entry,
list_entry) {
/* Avoid enabling or disabling vlan zero twice when in double
* vlan mode
*/
if (ice_is_dvm_ena(hw) &&
list_itr->fltr_info.l_data.vlan.tpid == 0)
continue;

vlan_id = list_itr->fltr_info.l_data.vlan.vlan_id;
if (rm_vlan_promisc)
status = _ice_clear_vsi_promisc(hw, vsi_handle,
Expand Down

0 comments on commit da3be8c

Please sign in to comment.