Lines Matching refs:fdb
180 static inline struct vxlan_rdst *first_remote_rcu(struct vxlan_fdb *fdb) in first_remote_rcu() argument
182 if (rcu_access_pointer(fdb->nh)) in first_remote_rcu()
184 return list_entry_rcu(fdb->remotes.next, struct vxlan_rdst, list); in first_remote_rcu()
187 static inline struct vxlan_rdst *first_remote_rtnl(struct vxlan_fdb *fdb) in first_remote_rtnl() argument
189 if (rcu_access_pointer(fdb->nh)) in first_remote_rtnl()
191 return list_first_entry(&fdb->remotes, struct vxlan_rdst, list); in first_remote_rtnl()
258 const struct vxlan_fdb *fdb, in vxlan_fdb_info() argument
281 nh = rcu_dereference(fdb->nh); in vxlan_fdb_info()
295 send_eth = !is_zero_ether_addr(fdb->eth_addr); in vxlan_fdb_info()
298 ndm->ndm_state = fdb->state; in vxlan_fdb_info()
300 ndm->ndm_flags = fdb->flags; in vxlan_fdb_info()
310 if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) in vxlan_fdb_info()
332 if ((vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) && fdb->vni && in vxlan_fdb_info()
334 be32_to_cpu(fdb->vni))) in vxlan_fdb_info()
337 ci.ndm_used = jiffies_to_clock_t(now - fdb->used); in vxlan_fdb_info()
339 ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated); in vxlan_fdb_info()
365 static void __vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in __vxlan_fdb_notify() argument
376 err = vxlan_fdb_info(skb, vxlan, fdb, 0, 0, type, 0, rd); in __vxlan_fdb_notify()
392 const struct vxlan_fdb *fdb, in vxlan_fdb_switchdev_notifier_info() argument
403 memcpy(fdb_info->eth_addr, fdb->eth_addr, ETH_ALEN); in vxlan_fdb_switchdev_notifier_info()
404 fdb_info->vni = fdb->vni; in vxlan_fdb_switchdev_notifier_info()
406 fdb_info->added_by_user = fdb->flags & NTF_VXLAN_ADDED_BY_USER; in vxlan_fdb_switchdev_notifier_info()
410 struct vxlan_fdb *fdb, in vxlan_fdb_switchdev_call_notifiers() argument
424 vxlan_fdb_switchdev_notifier_info(vxlan, fdb, rd, NULL, &info); in vxlan_fdb_switchdev_call_notifiers()
430 static int vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in vxlan_fdb_notify() argument
439 err = vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, in vxlan_fdb_notify()
445 vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, in vxlan_fdb_notify()
451 __vxlan_fdb_notify(vxlan, fdb, rd, type); in vxlan_fdb_notify()
858 static int vxlan_fdb_nh_update(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in vxlan_fdb_nh_update() argument
861 struct nexthop *old_nh = rtnl_dereference(fdb->nh); in vxlan_fdb_nh_update()
909 list_del_rcu(&fdb->nh_list); in vxlan_fdb_nh_update()
912 rcu_assign_pointer(fdb->nh, nh); in vxlan_fdb_nh_update()
913 list_add_tail_rcu(&fdb->nh_list, &nh->fdb_list); in vxlan_fdb_nh_update()
926 u32 nhid, struct vxlan_fdb **fdb, in vxlan_fdb_create() argument
949 *fdb = f; in vxlan_fdb_create()
4681 struct vxlan_fdb *fdb; in vxlan_fdb_nh_flush() local
4686 list_for_each_entry_rcu(fdb, &nh->fdb_list, nh_list) { in vxlan_fdb_nh_flush()
4687 vxlan = rcu_dereference(fdb->vdev); in vxlan_fdb_nh_flush()
4689 hash_index = fdb_head_index(vxlan, fdb->eth_addr, in vxlan_fdb_nh_flush()
4692 if (!hlist_unhashed(&fdb->hlist)) in vxlan_fdb_nh_flush()
4693 vxlan_fdb_destroy(vxlan, fdb, false, false); in vxlan_fdb_nh_flush()