Skip to content

Commit 964290f

Browse files
azaki1anguy11
authored andcommitted
iavf: do not track VLAN 0 filters
When an interface with the maximum number of VLAN filters is brought up, a spurious error is logged: [257.483082] 8021q: adding VLAN 0 to HW filter on device enp0s3 [257.483094] iavf 0000:00:03.0 enp0s3: Max allowed VLAN filters 8. Remove existing VLANs or disable filtering via Ethtool if supported. The VF driver complains that it cannot add the VLAN 0 filter. On the other hand, the PF driver always adds VLAN 0 filter on VF initialization. The VF does not need to ask the PF for that filter at all. Fix the error by not tracking VLAN 0 filters altogether. With that, the check added by commit 0e710a3 ("iavf: Fix VF driver counting VLAN 0 filters") in iavf_virtchnl.c is useless and might be confusing if left as it suggests that we track VLAN 0. Fixes: 0e710a3 ("iavf: Fix VF driver counting VLAN 0 filters") Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent de58647 commit 964290f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ static int iavf_vlan_rx_add_vid(struct net_device *netdev,
893893
{
894894
struct iavf_adapter *adapter = netdev_priv(netdev);
895895

896+
/* Do not track VLAN 0 filter, always added by the PF on VF init */
897+
if (!vid)
898+
return 0;
899+
896900
if (!VLAN_FILTERING_ALLOWED(adapter))
897901
return -EIO;
898902

@@ -919,6 +923,10 @@ static int iavf_vlan_rx_kill_vid(struct net_device *netdev,
919923
{
920924
struct iavf_adapter *adapter = netdev_priv(netdev);
921925

926+
/* We do not track VLAN 0 filter */
927+
if (!vid)
928+
return 0;
929+
922930
iavf_del_vlan(adapter, IAVF_VLAN(vid, be16_to_cpu(proto)));
923931
if (proto == cpu_to_be16(ETH_P_8021Q))
924932
clear_bit(vid, adapter->vsi.active_cvlans);

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,8 +2446,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
24462446
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
24472447
if (f->is_new_vlan) {
24482448
f->is_new_vlan = false;
2449-
if (!f->vlan.vid)
2450-
continue;
24512449
if (f->vlan.tpid == ETH_P_8021Q)
24522450
set_bit(f->vlan.vid,
24532451
adapter->vsi.active_cvlans);

0 commit comments

Comments
 (0)