Loading drivers/net/vxlan.c +8 −6 Original line number Original line Diff line number Diff line Loading @@ -774,12 +774,14 @@ static void vxlan_fdb_free(struct rcu_head *head) kfree(f); kfree(f); } } static void vxlan_fdb_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f) static void vxlan_fdb_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f, bool do_notify) { { netdev_dbg(vxlan->dev, netdev_dbg(vxlan->dev, "delete %pM\n", f->eth_addr); "delete %pM\n", f->eth_addr); --vxlan->addrcnt; --vxlan->addrcnt; if (do_notify) vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_DELNEIGH); vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_DELNEIGH); hlist_del_rcu(&f->hlist); hlist_del_rcu(&f->hlist); Loading Loading @@ -930,7 +932,7 @@ static int __vxlan_fdb_delete(struct vxlan_dev *vxlan, goto out; goto out; } } vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); out: out: return 0; return 0; Loading Loading @@ -2397,7 +2399,7 @@ static void vxlan_cleanup(struct timer_list *t) "garbage collect %pM\n", "garbage collect %pM\n", f->eth_addr); f->eth_addr); f->state = NUD_STALE; f->state = NUD_STALE; vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); } else if (time_before(timeout, next_timer)) } else if (time_before(timeout, next_timer)) next_timer = timeout; next_timer = timeout; } } Loading Loading @@ -2448,7 +2450,7 @@ static void vxlan_fdb_delete_default(struct vxlan_dev *vxlan, __be32 vni) spin_lock_bh(&vxlan->hash_lock); spin_lock_bh(&vxlan->hash_lock); f = __vxlan_find_mac(vxlan, all_zeros_mac, vni); f = __vxlan_find_mac(vxlan, all_zeros_mac, vni); if (f) if (f) vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); spin_unlock_bh(&vxlan->hash_lock); spin_unlock_bh(&vxlan->hash_lock); } } Loading Loading @@ -2502,7 +2504,7 @@ static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all) continue; continue; /* the all_zeros_mac entry is deleted at vxlan_uninit */ /* the all_zeros_mac entry is deleted at vxlan_uninit */ if (!is_zero_ether_addr(f->eth_addr)) if (!is_zero_ether_addr(f->eth_addr)) vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); } } } } spin_unlock_bh(&vxlan->hash_lock); spin_unlock_bh(&vxlan->hash_lock); Loading Loading
drivers/net/vxlan.c +8 −6 Original line number Original line Diff line number Diff line Loading @@ -774,12 +774,14 @@ static void vxlan_fdb_free(struct rcu_head *head) kfree(f); kfree(f); } } static void vxlan_fdb_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f) static void vxlan_fdb_destroy(struct vxlan_dev *vxlan, struct vxlan_fdb *f, bool do_notify) { { netdev_dbg(vxlan->dev, netdev_dbg(vxlan->dev, "delete %pM\n", f->eth_addr); "delete %pM\n", f->eth_addr); --vxlan->addrcnt; --vxlan->addrcnt; if (do_notify) vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_DELNEIGH); vxlan_fdb_notify(vxlan, f, first_remote_rtnl(f), RTM_DELNEIGH); hlist_del_rcu(&f->hlist); hlist_del_rcu(&f->hlist); Loading Loading @@ -930,7 +932,7 @@ static int __vxlan_fdb_delete(struct vxlan_dev *vxlan, goto out; goto out; } } vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); out: out: return 0; return 0; Loading Loading @@ -2397,7 +2399,7 @@ static void vxlan_cleanup(struct timer_list *t) "garbage collect %pM\n", "garbage collect %pM\n", f->eth_addr); f->eth_addr); f->state = NUD_STALE; f->state = NUD_STALE; vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); } else if (time_before(timeout, next_timer)) } else if (time_before(timeout, next_timer)) next_timer = timeout; next_timer = timeout; } } Loading Loading @@ -2448,7 +2450,7 @@ static void vxlan_fdb_delete_default(struct vxlan_dev *vxlan, __be32 vni) spin_lock_bh(&vxlan->hash_lock); spin_lock_bh(&vxlan->hash_lock); f = __vxlan_find_mac(vxlan, all_zeros_mac, vni); f = __vxlan_find_mac(vxlan, all_zeros_mac, vni); if (f) if (f) vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); spin_unlock_bh(&vxlan->hash_lock); spin_unlock_bh(&vxlan->hash_lock); } } Loading Loading @@ -2502,7 +2504,7 @@ static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all) continue; continue; /* the all_zeros_mac entry is deleted at vxlan_uninit */ /* the all_zeros_mac entry is deleted at vxlan_uninit */ if (!is_zero_ether_addr(f->eth_addr)) if (!is_zero_ether_addr(f->eth_addr)) vxlan_fdb_destroy(vxlan, f); vxlan_fdb_destroy(vxlan, f, true); } } } } spin_unlock_bh(&vxlan->hash_lock); spin_unlock_bh(&vxlan->hash_lock); Loading