Skip to content

Commit 4e7f008

Browse files
Marcin Szycikanguy11
authored andcommitted
ice: Restore fix disabling RX VLAN filtering
Fix setting dis_rx_filtering depending on whether port vlan is being turned on or off. This was originally fixed in commit c793f8e ("ice: Fix disabling Rx VLAN filtering with port VLAN enabled"), but while refactoring ice_vf_vsi_init_vlan_ops(), the fix has been lost. Restore the fix along with the original comment from that change. Also delete duplicate lines in ice_port_vlan_on(). Fixes: 2946204 ("ice: implement bridge port vlan") Reviewed-by: Wojciech Drewek <[email protected]> Signed-off-by: Marcin Szycik <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent f8e9889 commit 4e7f008

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/net/ethernet/intel/ice/ice_vf_vsi_vlan_ops.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ static void ice_port_vlan_on(struct ice_vsi *vsi)
3232
/* setup outer VLAN ops */
3333
vlan_ops->set_port_vlan = ice_vsi_set_outer_port_vlan;
3434
vlan_ops->clear_port_vlan = ice_vsi_clear_outer_port_vlan;
35-
vlan_ops->clear_port_vlan = ice_vsi_clear_outer_port_vlan;
3635

3736
/* setup inner VLAN ops */
3837
vlan_ops = &vsi->inner_vlan_ops;
@@ -47,8 +46,13 @@ static void ice_port_vlan_on(struct ice_vsi *vsi)
4746

4847
vlan_ops->set_port_vlan = ice_vsi_set_inner_port_vlan;
4948
vlan_ops->clear_port_vlan = ice_vsi_clear_inner_port_vlan;
50-
vlan_ops->clear_port_vlan = ice_vsi_clear_inner_port_vlan;
5149
}
50+
51+
/* all Rx traffic should be in the domain of the assigned port VLAN,
52+
* so prevent disabling Rx VLAN filtering
53+
*/
54+
vlan_ops->dis_rx_filtering = noop_vlan;
55+
5256
vlan_ops->ena_rx_filtering = ice_vsi_ena_rx_vlan_filtering;
5357
}
5458

@@ -77,6 +81,8 @@ static void ice_port_vlan_off(struct ice_vsi *vsi)
7781
vlan_ops->del_vlan = ice_vsi_del_vlan;
7882
}
7983

84+
vlan_ops->dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering;
85+
8086
if (!test_bit(ICE_FLAG_VF_VLAN_PRUNING, pf->flags))
8187
vlan_ops->ena_rx_filtering = noop_vlan;
8288
else
@@ -141,7 +147,6 @@ void ice_vf_vsi_init_vlan_ops(struct ice_vsi *vsi)
141147
&vsi->outer_vlan_ops : &vsi->inner_vlan_ops;
142148

143149
vlan_ops->add_vlan = ice_vsi_add_vlan;
144-
vlan_ops->dis_rx_filtering = ice_vsi_dis_rx_vlan_filtering;
145150
vlan_ops->ena_tx_filtering = ice_vsi_ena_tx_vlan_filtering;
146151
vlan_ops->dis_tx_filtering = ice_vsi_dis_tx_vlan_filtering;
147152
}

0 commit comments

Comments
 (0)