#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <uapi/linux/ppp_defs.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include "mvpp2.h"
#include "mvpp2_prs.h"
static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe)
{ … }
int mvpp2_prs_init_from_hw(struct mvpp2 *priv, struct mvpp2_prs_entry *pe,
int tid)
{ … }
static void mvpp2_prs_hw_inv(struct mvpp2 *priv, int index)
{ … }
static void mvpp2_prs_shadow_set(struct mvpp2 *priv, int index, int lu)
{ … }
static void mvpp2_prs_shadow_ri_set(struct mvpp2 *priv, int index,
unsigned int ri, unsigned int ri_mask)
{ … }
static void mvpp2_prs_tcam_lu_set(struct mvpp2_prs_entry *pe, unsigned int lu)
{ … }
static void mvpp2_prs_tcam_port_set(struct mvpp2_prs_entry *pe,
unsigned int port, bool add)
{ … }
static void mvpp2_prs_tcam_port_map_set(struct mvpp2_prs_entry *pe,
unsigned int ports)
{ … }
unsigned int mvpp2_prs_tcam_port_map_get(struct mvpp2_prs_entry *pe)
{ … }
static void mvpp2_prs_tcam_data_byte_set(struct mvpp2_prs_entry *pe,
unsigned int offs, unsigned char byte,
unsigned char enable)
{ … }
void mvpp2_prs_tcam_data_byte_get(struct mvpp2_prs_entry *pe,
unsigned int offs, unsigned char *byte,
unsigned char *enable)
{ … }
static bool mvpp2_prs_tcam_data_cmp(struct mvpp2_prs_entry *pe, int offs,
u16 data)
{ … }
static void mvpp2_prs_tcam_ai_update(struct mvpp2_prs_entry *pe,
unsigned int bits, unsigned int enable)
{ … }
static int mvpp2_prs_tcam_ai_get(struct mvpp2_prs_entry *pe)
{ … }
static void mvpp2_prs_match_etype(struct mvpp2_prs_entry *pe, int offset,
unsigned short ethertype)
{ … }
static void mvpp2_prs_match_vid(struct mvpp2_prs_entry *pe, int offset,
unsigned short vid)
{ … }
static void mvpp2_prs_sram_bits_set(struct mvpp2_prs_entry *pe, int bit_num,
u32 val)
{ … }
static void mvpp2_prs_sram_bits_clear(struct mvpp2_prs_entry *pe, int bit_num,
u32 val)
{ … }
static void mvpp2_prs_sram_ri_update(struct mvpp2_prs_entry *pe,
unsigned int bits, unsigned int mask)
{ … }
static int mvpp2_prs_sram_ri_get(struct mvpp2_prs_entry *pe)
{ … }
static void mvpp2_prs_sram_ai_update(struct mvpp2_prs_entry *pe,
unsigned int bits, unsigned int mask)
{ … }
static int mvpp2_prs_sram_ai_get(struct mvpp2_prs_entry *pe)
{ … }
static void mvpp2_prs_sram_next_lu_set(struct mvpp2_prs_entry *pe,
unsigned int lu)
{ … }
static void mvpp2_prs_sram_shift_set(struct mvpp2_prs_entry *pe, int shift,
unsigned int op)
{ … }
static void mvpp2_prs_sram_offset_set(struct mvpp2_prs_entry *pe,
unsigned int type, int offset,
unsigned int op)
{ … }
static int mvpp2_prs_flow_find(struct mvpp2 *priv, int flow)
{ … }
static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
unsigned char end)
{ … }
static void mvpp2_prs_drop_fc(struct mvpp2 *priv)
{ … }
static void mvpp2_prs_mac_drop_all_set(struct mvpp2 *priv, int port, bool add)
{ … }
void mvpp2_prs_mac_promisc_set(struct mvpp2 *priv, int port,
enum mvpp2_prs_l2_cast l2_cast, bool add)
{ … }
static void mvpp2_prs_dsa_tag_set(struct mvpp2 *priv, int port, bool add,
bool tagged, bool extend)
{ … }
static void mvpp2_prs_dsa_tag_ethertype_set(struct mvpp2 *priv, int port,
bool add, bool tagged, bool extend)
{ … }
static int mvpp2_prs_vlan_find(struct mvpp2 *priv, unsigned short tpid, int ai)
{ … }
static int mvpp2_prs_vlan_add(struct mvpp2 *priv, unsigned short tpid, int ai,
unsigned int port_map)
{ … }
static int mvpp2_prs_double_vlan_ai_free_get(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_double_vlan_find(struct mvpp2 *priv, unsigned short tpid1,
unsigned short tpid2)
{ … }
static int mvpp2_prs_double_vlan_add(struct mvpp2 *priv, unsigned short tpid1,
unsigned short tpid2,
unsigned int port_map)
{ … }
static int mvpp2_prs_ip4_proto(struct mvpp2 *priv, unsigned short proto,
unsigned int ri, unsigned int ri_mask)
{ … }
static int mvpp2_prs_ip4_cast(struct mvpp2 *priv, unsigned short l3_cast)
{ … }
static int mvpp2_prs_ip6_proto(struct mvpp2 *priv, unsigned short proto,
unsigned int ri, unsigned int ri_mask)
{ … }
static int mvpp2_prs_ip6_cast(struct mvpp2 *priv, unsigned short l3_cast)
{ … }
static void mvpp2_prs_hw_port_init(struct mvpp2 *priv, int port, int lu_first,
int lu_max, int offset)
{ … }
static void mvpp2_prs_def_flow_init(struct mvpp2 *priv)
{ … }
static void mvpp2_prs_mh_init(struct mvpp2 *priv)
{ … }
static void mvpp2_prs_mac_init(struct mvpp2 *priv)
{ … }
static void mvpp2_prs_dsa_init(struct mvpp2 *priv)
{ … }
static void mvpp2_prs_vid_init(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_etype_init(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_vlan_init(struct platform_device *pdev, struct mvpp2 *priv)
{ … }
static int mvpp2_prs_pppoe_init(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_ip4_init(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_ip6_init(struct mvpp2 *priv)
{ … }
static int mvpp2_prs_vid_range_find(struct mvpp2_port *port, u16 vid, u16 mask)
{ … }
int mvpp2_prs_vid_entry_add(struct mvpp2_port *port, u16 vid)
{ … }
void mvpp2_prs_vid_entry_remove(struct mvpp2_port *port, u16 vid)
{ … }
void mvpp2_prs_vid_remove_all(struct mvpp2_port *port)
{ … }
void mvpp2_prs_vid_disable_filtering(struct mvpp2_port *port)
{ … }
void mvpp2_prs_vid_enable_filtering(struct mvpp2_port *port)
{ … }
int mvpp2_prs_default_init(struct platform_device *pdev, struct mvpp2 *priv)
{ … }
static bool mvpp2_prs_mac_range_equals(struct mvpp2_prs_entry *pe,
const u8 *da, unsigned char *mask)
{ … }
static int
mvpp2_prs_mac_da_range_find(struct mvpp2 *priv, int pmap, const u8 *da,
unsigned char *mask, int udf_type)
{ … }
int mvpp2_prs_mac_da_accept(struct mvpp2_port *port, const u8 *da, bool add)
{ … }
int mvpp2_prs_update_mac_da(struct net_device *dev, const u8 *da)
{ … }
void mvpp2_prs_mac_del_all(struct mvpp2_port *port)
{ … }
int mvpp2_prs_tag_mode_set(struct mvpp2 *priv, int port, int type)
{ … }
int mvpp2_prs_add_flow(struct mvpp2 *priv, int flow, u32 ri, u32 ri_mask)
{ … }
int mvpp2_prs_def_flow(struct mvpp2_port *port)
{ … }
int mvpp2_prs_hits(struct mvpp2 *priv, int index)
{ … }