#include <linux/if_ether.h>
#include <linux/rhashtable.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <net/flow_offload.h>
#include <net/pkt_cls.h>
#include <net/dsa.h>
#include "mtk_eth_soc.h"
#include "mtk_wed.h"
struct mtk_flow_data { … };
static const struct rhashtable_params mtk_flow_ht_params = …;
static int
mtk_flow_set_ipv4_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe,
struct mtk_flow_data *data, bool egress)
{ … }
static int
mtk_flow_set_ipv6_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe,
struct mtk_flow_data *data)
{ … }
static void
mtk_flow_offload_mangle_eth(const struct flow_action_entry *act, void *eth)
{ … }
static int
mtk_flow_get_wdma_info(struct net_device *dev, const u8 *addr, struct mtk_wdma_info *info)
{ … }
static int
mtk_flow_mangle_ports(const struct flow_action_entry *act,
struct mtk_flow_data *data)
{ … }
static int
mtk_flow_mangle_ipv4(const struct flow_action_entry *act,
struct mtk_flow_data *data)
{ … }
static int
mtk_flow_get_dsa_port(struct net_device **dev)
{ … }
static int
mtk_flow_set_output_device(struct mtk_eth *eth, struct mtk_foe_entry *foe,
struct net_device *dev, const u8 *dest_mac,
int *wed_index)
{ … }
static int
mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,
int ppe_index)
{ … }
static int
mtk_flow_offload_destroy(struct mtk_eth *eth, struct flow_cls_offload *f)
{ … }
static int
mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
{ … }
static DEFINE_MUTEX(mtk_flow_offload_mutex);
int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls,
int ppe_index)
{ … }
static int
mtk_eth_setup_tc_block_cb(enum tc_setup_type type, void *type_data, void *cb_priv)
{ … }
static int
mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f)
{ … }
int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
void *type_data)
{ … }
int mtk_eth_offload_init(struct mtk_eth *eth, u8 id)
{ … }