#ifndef __ETHSW_H
#define __ETHSW_H
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
#include <uapi/linux/if_bridge.h>
#include <net/switchdev.h>
#include <linux/if_bridge.h>
#include <linux/fsl/mc.h>
#include <net/pkt_cls.h>
#include <soc/fsl/dpaa2-io.h>
#include "dpaa2-mac.h"
#include "dpsw.h"
#define DPSW_IRQ_NUM …
#define ETHSW_VLAN_MEMBER …
#define ETHSW_VLAN_UNTAGGED …
#define ETHSW_VLAN_PVID …
#define ETHSW_VLAN_GLOBAL …
#define DPAA2_MFL …
#define ETHSW_MAX_FRAME_LENGTH …
#define ETHSW_L2_MAX_FRM(mtu) …
#define ETHSW_FEATURE_MAC_ADDR …
#define DPAA2_SWITCH_RX_NUM_FQS …
#define DPAA2_SWITCH_RX_BUF_RAW_SIZE …
#define DPAA2_SWITCH_RX_BUF_TAILROOM …
#define DPAA2_SWITCH_RX_BUF_SIZE …
#define DPAA2_SWITCH_STORE_SIZE …
#define BUFS_PER_CMD …
#define DPAA2_ETHSW_NUM_BUFS …
#define DPAA2_ETHSW_REFILL_THRESH …
#define DPAA2_SWITCH_SWP_BUSY_RETRIES …
#define DPAA2_SWITCH_HWA_SIZE …
#define DPAA2_SWITCH_SWA_SIZE …
#define DPAA2_SWITCH_TX_BUF_ALIGN …
#define DPAA2_SWITCH_TX_DATA_OFFSET …
#define DPAA2_SWITCH_NEEDED_HEADROOM …
#define DPAA2_ETHSW_PORT_MAX_ACL_ENTRIES …
#define DPAA2_ETHSW_PORT_DEFAULT_TRAPS …
#define DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE …
extern const struct ethtool_ops dpaa2_switch_port_ethtool_ops;
struct ethsw_core;
struct dpaa2_switch_fq { … };
struct dpaa2_switch_fdb { … };
struct dpaa2_switch_acl_entry { … };
struct dpaa2_switch_mirror_entry { … };
struct dpaa2_switch_filter_block { … };
static inline bool
dpaa2_switch_acl_tbl_is_full(struct dpaa2_switch_filter_block *filter_block)
{ … }
struct ethsw_port_priv { … };
struct ethsw_core { … };
static inline int dpaa2_switch_get_index(struct ethsw_core *ethsw,
struct net_device *netdev)
{ … }
static inline bool dpaa2_switch_supports_cpu_traffic(struct ethsw_core *ethsw)
{ … }
static inline bool
dpaa2_switch_port_is_type_phy(struct ethsw_port_priv *port_priv)
{ … }
static inline bool dpaa2_switch_port_has_mac(struct ethsw_port_priv *port_priv)
{ … }
bool dpaa2_switch_port_dev_check(const struct net_device *netdev);
int dpaa2_switch_port_vlans_add(struct net_device *netdev,
const struct switchdev_obj_port_vlan *vlan);
int dpaa2_switch_port_vlans_del(struct net_device *netdev,
const struct switchdev_obj_port_vlan *vlan);
dpaa2_switch_fdb_cb_t;
int dpaa2_switch_cls_flower_replace(struct dpaa2_switch_filter_block *block,
struct flow_cls_offload *cls);
int dpaa2_switch_cls_flower_destroy(struct dpaa2_switch_filter_block *block,
struct flow_cls_offload *cls);
int dpaa2_switch_cls_matchall_replace(struct dpaa2_switch_filter_block *block,
struct tc_cls_matchall_offload *cls);
int dpaa2_switch_cls_matchall_destroy(struct dpaa2_switch_filter_block *block,
struct tc_cls_matchall_offload *cls);
int dpaa2_switch_acl_entry_add(struct dpaa2_switch_filter_block *block,
struct dpaa2_switch_acl_entry *entry);
int dpaa2_switch_block_offload_mirror(struct dpaa2_switch_filter_block *block,
struct ethsw_port_priv *port_priv);
int dpaa2_switch_block_unoffload_mirror(struct dpaa2_switch_filter_block *block,
struct ethsw_port_priv *port_priv);
#endif