#include <linux/etherdevice.h>
#include <linux/inetdevice.h>
#include <net/netevent.h>
#include <linux/idr.h>
#include <net/dst_metadata.h>
#include <net/arp.h>
#include "cmsg.h"
#include "main.h"
#include "../nfp_net_repr.h"
#include "../nfp_net.h"
#define NFP_FL_MAX_ROUTES …
#define NFP_TUN_PRE_TUN_RULE_LIMIT …
#define NFP_TUN_PRE_TUN_RULE_DEL …
#define NFP_TUN_PRE_TUN_IDX_BIT …
#define NFP_TUN_PRE_TUN_IPV6_BIT …
struct nfp_tun_pre_tun_rule { … };
struct nfp_tun_active_tuns { … };
struct nfp_tun_active_tuns_v6 { … };
struct nfp_tun_req_route_ipv4 { … };
struct nfp_tun_req_route_ipv6 { … };
struct nfp_offloaded_route { … };
#define NFP_FL_IPV4_ADDRS_MAX …
struct nfp_tun_ipv4_addr { … };
struct nfp_ipv4_addr_entry { … };
#define NFP_FL_IPV6_ADDRS_MAX …
struct nfp_tun_ipv6_addr { … };
#define NFP_TUN_MAC_OFFLOAD_DEL_FLAG …
struct nfp_tun_mac_addr_offload { … };
struct nfp_neigh_update_work { … };
enum nfp_flower_mac_offload_cmd { … };
#define NFP_MAX_MAC_INDEX …
struct nfp_tun_offloaded_mac { … };
static const struct rhashtable_params offloaded_macs_params = …;
void nfp_tunnel_keep_alive(struct nfp_app *app, struct sk_buff *skb)
{ … }
void nfp_tunnel_keep_alive_v6(struct nfp_app *app, struct sk_buff *skb)
{ … }
static int
nfp_flower_xmit_tun_conf(struct nfp_app *app, u8 mtype, u16 plen, void *pdata,
gfp_t flag)
{ … }
static void
nfp_tun_mutual_link(struct nfp_predt_entry *predt,
struct nfp_neigh_entry *neigh)
{ … }
static void
nfp_tun_link_predt_entries(struct nfp_app *app,
struct nfp_neigh_entry *nn_entry)
{ … }
void nfp_tun_link_and_update_nn_entries(struct nfp_app *app,
struct nfp_predt_entry *predt)
{ … }
static void nfp_tun_cleanup_nn_entries(struct nfp_app *app)
{ … }
void nfp_tun_unlink_and_update_nn_entries(struct nfp_app *app,
struct nfp_predt_entry *predt)
{ … }
static void
nfp_tun_write_neigh(struct net_device *netdev, struct nfp_app *app,
void *flow, struct neighbour *neigh, bool is_ipv6,
bool override)
{ … }
static void
nfp_tun_release_neigh_update_work(struct nfp_neigh_update_work *update_work)
{ … }
static void nfp_tun_neigh_update(struct work_struct *work)
{ … }
static struct nfp_neigh_update_work *
nfp_tun_alloc_neigh_update_work(struct nfp_app *app, struct neighbour *n)
{ … }
static int
nfp_tun_neigh_event_handler(struct notifier_block *nb, unsigned long event,
void *ptr)
{ … }
void nfp_tunnel_request_route_v4(struct nfp_app *app, struct sk_buff *skb)
{ … }
void nfp_tunnel_request_route_v6(struct nfp_app *app, struct sk_buff *skb)
{ … }
static void nfp_tun_write_ipv4_list(struct nfp_app *app)
{ … }
void nfp_tunnel_add_ipv4_off(struct nfp_app *app, __be32 ipv4)
{ … }
void nfp_tunnel_del_ipv4_off(struct nfp_app *app, __be32 ipv4)
{ … }
static void nfp_tun_write_ipv6_list(struct nfp_app *app)
{ … }
struct nfp_ipv6_addr_entry *
nfp_tunnel_add_ipv6_off(struct nfp_app *app, struct in6_addr *ipv6)
{ … }
void
nfp_tunnel_put_ipv6_off(struct nfp_app *app, struct nfp_ipv6_addr_entry *entry)
{ … }
static int
__nfp_tunnel_offload_mac(struct nfp_app *app, const u8 *mac, u16 idx, bool del)
{ … }
static bool nfp_tunnel_port_is_phy_repr(int port)
{ … }
static u16 nfp_tunnel_get_mac_idx_from_phy_port_id(int port)
{ … }
static u16 nfp_tunnel_get_global_mac_idx_from_ida(int id)
{ … }
static int nfp_tunnel_get_ida_from_global_mac_idx(u16 nfp_mac_idx)
{ … }
static bool nfp_tunnel_is_mac_idx_global(u16 nfp_mac_idx)
{ … }
static struct nfp_tun_offloaded_mac *
nfp_tunnel_lookup_offloaded_macs(struct nfp_app *app, const u8 *mac)
{ … }
static void
nfp_tunnel_offloaded_macs_inc_ref_and_link(struct nfp_tun_offloaded_mac *entry,
struct net_device *netdev, bool mod)
{ … }
static int
nfp_tunnel_add_shared_mac(struct nfp_app *app, struct net_device *netdev,
int port, bool mod)
{ … }
static int
nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
const u8 *mac, bool mod)
{ … }
static int
nfp_tunnel_offload_mac(struct nfp_app *app, struct net_device *netdev,
enum nfp_flower_mac_offload_cmd cmd)
{ … }
int nfp_tunnel_mac_event_handler(struct nfp_app *app,
struct net_device *netdev,
unsigned long event, void *ptr)
{ … }
int nfp_flower_xmit_pre_tun_flow(struct nfp_app *app,
struct nfp_fl_payload *flow)
{ … }
int nfp_flower_xmit_pre_tun_del_flow(struct nfp_app *app,
struct nfp_fl_payload *flow)
{ … }
int nfp_tunnel_config_start(struct nfp_app *app)
{ … }
void nfp_tunnel_config_stop(struct nfp_app *app)
{ … }