Lines Matching refs:fdb

179 static inline struct vxlan_rdst *first_remote_rcu(struct vxlan_fdb *fdb)  in first_remote_rcu()  argument
181 if (rcu_access_pointer(fdb->nh)) in first_remote_rcu()
183 return list_entry_rcu(fdb->remotes.next, struct vxlan_rdst, list); in first_remote_rcu()
186 static inline struct vxlan_rdst *first_remote_rtnl(struct vxlan_fdb *fdb) in first_remote_rtnl() argument
188 if (rcu_access_pointer(fdb->nh)) in first_remote_rtnl()
190 return list_first_entry(&fdb->remotes, struct vxlan_rdst, list); in first_remote_rtnl()
257 const struct vxlan_fdb *fdb, in vxlan_fdb_info() argument
280 nh = rcu_dereference(fdb->nh); in vxlan_fdb_info()
294 send_eth = !is_zero_ether_addr(fdb->eth_addr); in vxlan_fdb_info()
297 ndm->ndm_state = fdb->state; in vxlan_fdb_info()
299 ndm->ndm_flags = fdb->flags; in vxlan_fdb_info()
309 if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) in vxlan_fdb_info()
331 if ((vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) && fdb->vni && in vxlan_fdb_info()
333 be32_to_cpu(fdb->vni))) in vxlan_fdb_info()
336 ci.ndm_used = jiffies_to_clock_t(now - fdb->used); in vxlan_fdb_info()
338 ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated); in vxlan_fdb_info()
364 static void __vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in __vxlan_fdb_notify() argument
375 err = vxlan_fdb_info(skb, vxlan, fdb, 0, 0, type, 0, rd); in __vxlan_fdb_notify()
391 const struct vxlan_fdb *fdb, in vxlan_fdb_switchdev_notifier_info() argument
402 memcpy(fdb_info->eth_addr, fdb->eth_addr, ETH_ALEN); in vxlan_fdb_switchdev_notifier_info()
403 fdb_info->vni = fdb->vni; in vxlan_fdb_switchdev_notifier_info()
405 fdb_info->added_by_user = fdb->flags & NTF_VXLAN_ADDED_BY_USER; in vxlan_fdb_switchdev_notifier_info()
409 struct vxlan_fdb *fdb, in vxlan_fdb_switchdev_call_notifiers() argument
423 vxlan_fdb_switchdev_notifier_info(vxlan, fdb, rd, NULL, &info); in vxlan_fdb_switchdev_call_notifiers()
429 static int vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in vxlan_fdb_notify() argument
438 err = vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, in vxlan_fdb_notify()
444 vxlan_fdb_switchdev_call_notifiers(vxlan, fdb, rd, in vxlan_fdb_notify()
450 __vxlan_fdb_notify(vxlan, fdb, rd, type); in vxlan_fdb_notify()
857 static int vxlan_fdb_nh_update(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb, in vxlan_fdb_nh_update() argument
860 struct nexthop *old_nh = rtnl_dereference(fdb->nh); in vxlan_fdb_nh_update()
908 list_del_rcu(&fdb->nh_list); in vxlan_fdb_nh_update()
911 rcu_assign_pointer(fdb->nh, nh); in vxlan_fdb_nh_update()
912 list_add_tail_rcu(&fdb->nh_list, &nh->fdb_list); in vxlan_fdb_nh_update()
925 u32 nhid, struct vxlan_fdb **fdb, in vxlan_fdb_create() argument
948 *fdb = f; in vxlan_fdb_create()
4682 struct vxlan_fdb *fdb; in vxlan_fdb_nh_flush() local
4687 list_for_each_entry_rcu(fdb, &nh->fdb_list, nh_list) { in vxlan_fdb_nh_flush()
4688 vxlan = rcu_dereference(fdb->vdev); in vxlan_fdb_nh_flush()
4690 hash_index = fdb_head_index(vxlan, fdb->eth_addr, in vxlan_fdb_nh_flush()
4693 if (!hlist_unhashed(&fdb->hlist)) in vxlan_fdb_nh_flush()
4694 vxlan_fdb_destroy(vxlan, fdb, false, false); in vxlan_fdb_nh_flush()