#include <linux/ethtool_netlink.h>
#include <linux/netdevice.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <net/udp_tunnel.h>
#include <net/vxlan.h>
enum udp_tunnel_nic_table_entry_flags { … };
struct udp_tunnel_nic_table_entry { … };
struct udp_tunnel_nic { … };
static struct workqueue_struct *udp_tunnel_nic_workqueue;
static const char *udp_tunnel_nic_tunnel_type_name(unsigned int type)
{ … }
static bool
udp_tunnel_nic_entry_is_free(struct udp_tunnel_nic_table_entry *entry)
{ … }
static bool
udp_tunnel_nic_entry_is_present(struct udp_tunnel_nic_table_entry *entry)
{ … }
static bool
udp_tunnel_nic_entry_is_frozen(struct udp_tunnel_nic_table_entry *entry)
{ … }
static void
udp_tunnel_nic_entry_freeze_used(struct udp_tunnel_nic_table_entry *entry)
{ … }
static void
udp_tunnel_nic_entry_unfreeze(struct udp_tunnel_nic_table_entry *entry)
{ … }
static bool
udp_tunnel_nic_entry_is_queued(struct udp_tunnel_nic_table_entry *entry)
{ … }
static void
udp_tunnel_nic_entry_queue(struct udp_tunnel_nic *utn,
struct udp_tunnel_nic_table_entry *entry,
unsigned int flag)
{ … }
static void
udp_tunnel_nic_ti_from_entry(struct udp_tunnel_nic_table_entry *entry,
struct udp_tunnel_info *ti)
{ … }
static bool
udp_tunnel_nic_is_empty(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static bool
udp_tunnel_nic_should_replay(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static void
__udp_tunnel_nic_get_port(struct net_device *dev, unsigned int table,
unsigned int idx, struct udp_tunnel_info *ti)
{ … }
static void
__udp_tunnel_nic_set_port_priv(struct net_device *dev, unsigned int table,
unsigned int idx, u8 priv)
{ … }
static void
udp_tunnel_nic_entry_update_done(struct udp_tunnel_nic_table_entry *entry,
int err)
{ … }
static void
udp_tunnel_nic_device_sync_one(struct net_device *dev,
struct udp_tunnel_nic *utn,
unsigned int table, unsigned int idx)
{ … }
static void
udp_tunnel_nic_device_sync_by_port(struct net_device *dev,
struct udp_tunnel_nic *utn)
{ … }
static void
udp_tunnel_nic_device_sync_by_table(struct net_device *dev,
struct udp_tunnel_nic *utn)
{ … }
static void
__udp_tunnel_nic_device_sync(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static void
udp_tunnel_nic_device_sync(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static bool
udp_tunnel_nic_table_is_capable(const struct udp_tunnel_nic_table_info *table,
struct udp_tunnel_info *ti)
{ … }
static bool
udp_tunnel_nic_is_capable(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti)
{ … }
static int
udp_tunnel_nic_has_collision(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti)
{ … }
static void
udp_tunnel_nic_entry_adj(struct udp_tunnel_nic *utn,
unsigned int table, unsigned int idx, int use_cnt_adj)
{ … }
static bool
udp_tunnel_nic_entry_try_adj(struct udp_tunnel_nic *utn,
unsigned int table, unsigned int idx,
struct udp_tunnel_info *ti, int use_cnt_adj)
{ … }
static bool
udp_tunnel_nic_try_existing(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti, int use_cnt_adj)
{ … }
static bool
udp_tunnel_nic_add_existing(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti)
{ … }
static bool
udp_tunnel_nic_del_existing(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti)
{ … }
static bool
udp_tunnel_nic_add_new(struct net_device *dev, struct udp_tunnel_nic *utn,
struct udp_tunnel_info *ti)
{ … }
static void
__udp_tunnel_nic_add_port(struct net_device *dev, struct udp_tunnel_info *ti)
{ … }
static void
__udp_tunnel_nic_del_port(struct net_device *dev, struct udp_tunnel_info *ti)
{ … }
static void __udp_tunnel_nic_reset_ntf(struct net_device *dev)
{ … }
static size_t
__udp_tunnel_nic_dump_size(struct net_device *dev, unsigned int table)
{ … }
static int
__udp_tunnel_nic_dump_write(struct net_device *dev, unsigned int table,
struct sk_buff *skb)
{ … }
static const struct udp_tunnel_nic_ops __udp_tunnel_nic_ops = …;
static void
udp_tunnel_nic_flush(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static void
udp_tunnel_nic_replay(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static void udp_tunnel_nic_device_sync_work(struct work_struct *work)
{ … }
static struct udp_tunnel_nic *
udp_tunnel_nic_alloc(const struct udp_tunnel_nic_info *info,
unsigned int n_tables)
{ … }
static void udp_tunnel_nic_free(struct udp_tunnel_nic *utn)
{ … }
static int udp_tunnel_nic_register(struct net_device *dev)
{ … }
static void
udp_tunnel_nic_unregister(struct net_device *dev, struct udp_tunnel_nic *utn)
{ … }
static int
udp_tunnel_nic_netdevice_event(struct notifier_block *unused,
unsigned long event, void *ptr)
{ … }
static struct notifier_block udp_tunnel_nic_notifier_block __read_mostly = …;
static int __init udp_tunnel_nic_init_module(void)
{ … }
late_initcall(udp_tunnel_nic_init_module);
static void __exit udp_tunnel_nic_cleanup_module(void)
{ … }
module_exit(udp_tunnel_nic_cleanup_module);
MODULE_LICENSE(…) …;