#include <linux/etherdevice.h>
#include <linux/lockdep.h>
#include <linux/pci.h>
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
#include <net/devlink.h>
#include <net/dst_metadata.h>
#include "main.h"
#include "../nfpcore/nfp_cpp.h"
#include "../nfpcore/nfp_nffw.h"
#include "../nfpcore/nfp_nsp.h"
#include "../nfp_app.h"
#include "../nfp_main.h"
#include "../nfp_net.h"
#include "../nfp_net_repr.h"
#include "../nfp_port.h"
#include "./cmsg.h"
#define NFP_FLOWER_ALLOWED_VER …
#define NFP_MIN_INT_PORT_ID …
#define NFP_MAX_INT_PORT_ID …
static const char *nfp_flower_extra_cap(struct nfp_app *app, struct nfp_net *nn)
{ … }
static enum devlink_eswitch_mode eswitch_mode_get(struct nfp_app *app)
{ … }
static int
nfp_flower_lookup_internal_port_id(struct nfp_flower_priv *priv,
struct net_device *netdev)
{ … }
static int
nfp_flower_get_internal_port_id(struct nfp_app *app, struct net_device *netdev)
{ … }
u32 nfp_flower_get_port_id_from_netdev(struct nfp_app *app,
struct net_device *netdev)
{ … }
static struct net_device *
nfp_flower_get_netdev_from_internal_port_id(struct nfp_app *app, int port_id)
{ … }
static void
nfp_flower_free_internal_port_id(struct nfp_app *app, struct net_device *netdev)
{ … }
static int
nfp_flower_internal_port_event_handler(struct nfp_app *app,
struct net_device *netdev,
unsigned long event)
{ … }
static void nfp_flower_internal_port_init(struct nfp_flower_priv *priv)
{ … }
static void nfp_flower_internal_port_cleanup(struct nfp_flower_priv *priv)
{ … }
static struct nfp_flower_non_repr_priv *
nfp_flower_non_repr_priv_lookup(struct nfp_app *app, struct net_device *netdev)
{ … }
void
__nfp_flower_non_repr_priv_get(struct nfp_flower_non_repr_priv *non_repr_priv)
{ … }
struct nfp_flower_non_repr_priv *
nfp_flower_non_repr_priv_get(struct nfp_app *app, struct net_device *netdev)
{ … }
void
__nfp_flower_non_repr_priv_put(struct nfp_flower_non_repr_priv *non_repr_priv)
{ … }
void
nfp_flower_non_repr_priv_put(struct nfp_app *app, struct net_device *netdev)
{ … }
static enum nfp_repr_type
nfp_flower_repr_get_type_and_port(struct nfp_app *app, u32 port_id, u8 *port)
{ … }
static struct net_device *
nfp_flower_dev_get(struct nfp_app *app, u32 port_id, bool *redir_egress)
{ … }
static int
nfp_flower_reprs_reify(struct nfp_app *app, enum nfp_repr_type type,
bool exists)
{ … }
static int
nfp_flower_wait_repr_reify(struct nfp_app *app, atomic_t *replies, int tot_repl)
{ … }
static int
nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr)
{ … }
static int
nfp_flower_repr_netdev_stop(struct nfp_app *app, struct nfp_repr *repr)
{ … }
static void
nfp_flower_repr_netdev_clean(struct nfp_app *app, struct net_device *netdev)
{ … }
static void
nfp_flower_repr_netdev_preclean(struct nfp_app *app, struct net_device *netdev)
{ … }
static void nfp_flower_sriov_disable(struct nfp_app *app)
{ … }
static int
nfp_flower_spawn_vnic_reprs(struct nfp_app *app,
enum nfp_flower_cmsg_port_vnic_type vnic_type,
enum nfp_repr_type repr_type, unsigned int cnt)
{ … }
static int nfp_flower_sriov_enable(struct nfp_app *app, int num_vfs)
{ … }
static int
nfp_flower_spawn_phy_reprs(struct nfp_app *app, struct nfp_flower_priv *priv)
{ … }
static int nfp_flower_vnic_alloc(struct nfp_app *app, struct nfp_net *nn,
unsigned int id)
{ … }
static void nfp_flower_vnic_clean(struct nfp_app *app, struct nfp_net *nn)
{ … }
static int nfp_flower_vnic_init(struct nfp_app *app, struct nfp_net *nn)
{ … }
static void nfp_flower_wait_host_bit(struct nfp_app *app)
{ … }
static int nfp_flower_sync_feature_bits(struct nfp_app *app)
{ … }
static int nfp_flower_init(struct nfp_app *app)
{ … }
static void nfp_flower_clean(struct nfp_app *app)
{ … }
static bool nfp_flower_check_ack(struct nfp_flower_priv *app_priv)
{ … }
static int
nfp_flower_repr_change_mtu(struct nfp_app *app, struct net_device *netdev,
int new_mtu)
{ … }
static int nfp_flower_start(struct nfp_app *app)
{ … }
static void nfp_flower_stop(struct nfp_app *app)
{ … }
static int
nfp_flower_netdev_event(struct nfp_app *app, struct net_device *netdev,
unsigned long event, void *ptr)
{ … }
const struct nfp_app_type app_flower = …;