#include <linux/netdevice.h>
#include <linux/if_macvlan.h>
#include <linux/list.h>
#include <linux/rculist.h>
#include <linux/rtnetlink.h>
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include "tc.h"
#include "neigh.h"
#include "en_rep.h"
#include "eswitch.h"
#include "lib/fs_chains.h"
#include "en/tc_ct.h"
#include "en/mapping.h"
#include "en/tc_tun.h"
#include "lib/port_tun.h"
#include "en/tc/sample.h"
#include "en_accel/ipsec_rxtx.h"
#include "en/tc/int_port.h"
#include "en/tc/act/act.h"
struct mlx5e_rep_indr_block_priv { … };
int mlx5e_rep_encap_entry_attach(struct mlx5e_priv *priv,
struct mlx5e_encap_entry *e,
struct mlx5e_neigh *m_neigh,
struct net_device *neigh_dev)
{ … }
void mlx5e_rep_encap_entry_detach(struct mlx5e_priv *priv,
struct mlx5e_encap_entry *e)
{ … }
void mlx5e_rep_update_flows(struct mlx5e_priv *priv,
struct mlx5e_encap_entry *e,
bool neigh_connected,
unsigned char ha[ETH_ALEN])
{ … }
static int
mlx5e_rep_setup_tc_cls_flower(struct mlx5e_priv *priv,
struct flow_cls_offload *cls_flower, int flags)
{ … }
static void mlx5e_tc_stats_matchall(struct mlx5e_priv *priv,
struct tc_cls_matchall_offload *ma)
{ … }
static
int mlx5e_rep_setup_tc_cls_matchall(struct mlx5e_priv *priv,
struct tc_cls_matchall_offload *ma)
{ … }
static int mlx5e_rep_setup_tc_cb(enum tc_setup_type type, void *type_data,
void *cb_priv)
{ … }
static int mlx5e_rep_setup_ft_cb(enum tc_setup_type type, void *type_data,
void *cb_priv)
{ … }
static LIST_HEAD(mlx5e_rep_block_tc_cb_list);
static LIST_HEAD(mlx5e_rep_block_ft_cb_list);
int mlx5e_rep_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data)
{ … }
int mlx5e_rep_tc_init(struct mlx5e_rep_priv *rpriv)
{ … }
void mlx5e_rep_tc_cleanup(struct mlx5e_rep_priv *rpriv)
{ … }
void mlx5e_rep_tc_enable(struct mlx5e_priv *priv)
{ … }
void mlx5e_rep_tc_disable(struct mlx5e_priv *priv)
{ … }
int mlx5e_rep_tc_event_port_affinity(struct mlx5e_priv *priv)
{ … }
static struct mlx5e_rep_indr_block_priv *
mlx5e_rep_indr_block_priv_lookup(struct mlx5e_rep_priv *rpriv,
struct net_device *netdev,
enum flow_block_binder_type binder_type)
{ … }
static int
mlx5e_rep_indr_offload(struct net_device *netdev,
struct flow_cls_offload *flower,
struct mlx5e_rep_indr_block_priv *indr_priv,
unsigned long flags)
{ … }
static int mlx5e_rep_indr_setup_tc_cb(enum tc_setup_type type,
void *type_data, void *indr_priv)
{ … }
static int mlx5e_rep_indr_setup_ft_cb(enum tc_setup_type type,
void *type_data, void *indr_priv)
{ … }
static void mlx5e_rep_indr_block_unbind(void *cb_priv)
{ … }
static LIST_HEAD(mlx5e_block_cb_list);
static bool mlx5e_rep_macvlan_mode_supported(const struct net_device *dev)
{ … }
static bool
mlx5e_rep_check_indr_block_supported(struct mlx5e_rep_priv *rpriv,
struct net_device *netdev,
struct flow_block_offload *f)
{ … }
static int
mlx5e_rep_indr_setup_block(struct net_device *netdev, struct Qdisc *sch,
struct mlx5e_rep_priv *rpriv,
struct flow_block_offload *f,
flow_setup_cb_t *setup_cb,
void *data,
void (*cleanup)(struct flow_block_cb *block_cb))
{ … }
static int
mlx5e_rep_indr_replace_act(struct mlx5e_rep_priv *rpriv,
struct flow_offload_action *fl_act)
{ … }
static int
mlx5e_rep_indr_destroy_act(struct mlx5e_rep_priv *rpriv,
struct flow_offload_action *fl_act)
{ … }
static int
mlx5e_rep_indr_stats_act(struct mlx5e_rep_priv *rpriv,
struct flow_offload_action *fl_act)
{ … }
static int
mlx5e_rep_indr_setup_act(struct mlx5e_rep_priv *rpriv,
struct flow_offload_action *fl_act)
{ … }
static int
mlx5e_rep_indr_no_dev_setup(struct mlx5e_rep_priv *rpriv,
enum tc_setup_type type,
void *data)
{ … }
static
int mlx5e_rep_indr_setup_cb(struct net_device *netdev, struct Qdisc *sch, void *cb_priv,
enum tc_setup_type type, void *type_data,
void *data,
void (*cleanup)(struct flow_block_cb *block_cb))
{ … }
int mlx5e_rep_tc_netdevice_event_register(struct mlx5e_rep_priv *rpriv)
{ … }
void mlx5e_rep_tc_netdevice_event_unregister(struct mlx5e_rep_priv *rpriv)
{ … }
void mlx5e_rep_tc_receive(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
struct sk_buff *skb)
{ … }