Commit e5edb7b1 authored by amit salecha's avatar amit salecha Committed by David S. Miller

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: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5ccd961
...@@ -942,6 +942,7 @@ struct qlcnic_ipaddr { ...@@ -942,6 +942,7 @@ struct qlcnic_ipaddr {
#define QLCNIC_LOOPBACK_TEST 2 #define QLCNIC_LOOPBACK_TEST 2
#define QLCNIC_FILTER_AGE 80 #define QLCNIC_FILTER_AGE 80
#define QLCNIC_READD_AGE 20
#define QLCNIC_LB_MAX_FILTERS 64 #define QLCNIC_LB_MAX_FILTERS 64
struct qlcnic_filter { struct qlcnic_filter {
......
...@@ -1860,6 +1860,11 @@ qlcnic_send_filter(struct qlcnic_adapter *adapter, ...@@ -1860,6 +1860,11 @@ qlcnic_send_filter(struct qlcnic_adapter *adapter,
hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) { hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) {
if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) && if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) &&
tmp_fil->vlan_id == vlan_id) { tmp_fil->vlan_id == vlan_id) {
if (jiffies >
(QLCNIC_READD_AGE * HZ + tmp_fil->ftime))
qlcnic_change_filter(adapter, src_addr, vlan_id,
tx_ring);
tmp_fil->ftime = jiffies; tmp_fil->ftime = jiffies;
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment