iavf: Create VLAN tag elements starting from the first element
authorAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tue, 14 May 2019 17:36:59 +0000 (10:36 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 17 Jun 2019 22:39:25 +0000 (15:39 -0700)
This patch changes how VLAN tag are being populated and programmed into
the HW - Instead of start adding VF VLAN tag from the last member of the
element list, start from the first member of the list, until number of
allowed VLAN tags is exhausted in the HW.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c

index 44d2150adb37bf17f2dc5c6d9e9a44cf481cfe00..36f17d0c7a2e17a2e2d918cef4ad3180ac719375 100644 (file)
@@ -665,8 +665,7 @@ iavf_vlan_filter *iavf_add_vlan(struct iavf_adapter *adapter, u16 vlan)
 
                f->vlan = vlan;
 
-               INIT_LIST_HEAD(&f->list);
-               list_add(&f->list, &adapter->vlan_filter_list);
+               list_add_tail(&f->list, &adapter->vlan_filter_list);
                f->add = true;
                adapter->aq_required |= IAVF_FLAG_AQ_ADD_VLAN_FILTER;
        }