--- zzzz-none-000/linux-5.4.213/include/net/vxlan.h 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/include/net/vxlan.h 2024-05-29 11:20:02.000000000 +0000 @@ -289,6 +289,19 @@ VXLAN_F_UDP_ZERO_CSUM6_RX | \ VXLAN_F_COLLECT_METADATA) +/* + * Application data for fdb notifier event + */ +struct vxlan_fdb_event { + struct net_device *dev; + struct vxlan_rdst *rdst; + u8 eth_addr[ETH_ALEN]; +}; + +extern void vxlan_fdb_register_notify(struct notifier_block *nb); +extern void vxlan_fdb_unregister_notify(struct notifier_block *nb); +extern void vxlan_fdb_update_mac(struct vxlan_dev *vxlan, const u8 *mac, uint32_t vni); + struct net_device *vxlan_dev_create(struct net *net, const char *name, u8 name_assign_type, struct vxlan_config *conf); @@ -372,6 +385,15 @@ return vni_field; } +/* + * vxlan_get_vni() + * Returns the vni corresponding to tunnel + */ +static inline u32 vxlan_get_vni(struct vxlan_dev *vxlan_tun) +{ + return be32_to_cpu(vxlan_tun->cfg.vni); +} + static inline unsigned short vxlan_get_sk_family(struct vxlan_sock *vs) { return vs->sock->sk->sk_family;