iavf: Fix VF driver counting VLAN 0 filters
authorMichal Jaron <michalx.jaron@intel.com>
Fri, 14 Oct 2022 08:45:37 +0000 (10:45 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 9 Nov 2022 21:20:55 +0000 (13:20 -0800)
VF driver mistakenly counts VLAN 0 filters, when no PF driver
counts them.
Do not count VLAN 0 filters, when VLAN_V2 is engaged.
Counting those filters in, will affect filters size by -1, when
sending batched VLAN addition message.

Fixes: 968996c070ef ("iavf: Fix VLAN_V2 addition/rejection")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

index 5a9e656..24a701f 100644 (file)
@@ -2438,6 +2438,8 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
                list_for_each_entry(f, &adapter->vlan_filter_list, list) {
                        if (f->is_new_vlan) {
                                f->is_new_vlan = false;
+                               if (!f->vlan.vid)
+                                       continue;
                                if (f->vlan.tpid == ETH_P_8021Q)
                                        set_bit(f->vlan.vid,
                                                adapter->vsi.active_cvlans);