Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qlcnic: fix mac learning

In failover bonding case, same mac address can be programmed on other slave function.
Fw will delete old entry (original func) associated with that mac address.
Need to reporgram mac address, if failover again happen to original function.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

amit salecha and committed by
David S. Miller
e5edb7b1 e5ccd961

+6
+1
drivers/net/qlcnic/qlcnic.h
··· 942 942 #define QLCNIC_LOOPBACK_TEST 2 943 943 944 944 #define QLCNIC_FILTER_AGE 80 945 + #define QLCNIC_READD_AGE 20 945 946 #define QLCNIC_LB_MAX_FILTERS 64 946 947 947 948 struct qlcnic_filter {
+5
drivers/net/qlcnic/qlcnic_main.c
··· 1860 1860 hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) { 1861 1861 if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) && 1862 1862 tmp_fil->vlan_id == vlan_id) { 1863 + 1864 + if (jiffies > 1865 + (QLCNIC_READD_AGE * HZ + tmp_fil->ftime)) 1866 + qlcnic_change_filter(adapter, src_addr, vlan_id, 1867 + tx_ring); 1863 1868 tmp_fil->ftime = jiffies; 1864 1869 return; 1865 1870 }