#ifndef BNXT_TC_H
#define BNXT_TC_H
#ifdef CONFIG_BNXT_FLOWER_OFFLOAD
#include <net/ip_tunnels.h>
struct bnxt_tc_l2_key { … };
struct bnxt_tc_l3_key { … };
struct bnxt_tc_l4_key { … };
struct bnxt_tc_tunnel_key { … };
#define bnxt_eth_addr_key_mask_invalid(eth_addr, eth_addr_mask) …
struct bnxt_tc_actions { … };
struct bnxt_tc_flow { … };
struct bnxt_tc_tunnel_node { … };
struct bnxt_tc_l2_node { … };
struct bnxt_tc_flow_node { … };
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
struct flow_cls_offload *cls_flower);
int bnxt_init_tc(struct bnxt *bp);
void bnxt_shutdown_tc(struct bnxt *bp);
void bnxt_tc_flow_stats_work(struct bnxt *bp);
static inline bool bnxt_tc_flower_enabled(struct bnxt *bp)
{ … }
#else
static inline int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
struct flow_cls_offload *cls_flower)
{
return -EOPNOTSUPP;
}
static inline int bnxt_init_tc(struct bnxt *bp)
{
return 0;
}
static inline void bnxt_shutdown_tc(struct bnxt *bp)
{
}
static inline void bnxt_tc_flow_stats_work(struct bnxt *bp)
{
}
static inline bool bnxt_tc_flower_enabled(struct bnxt *bp)
{
return false;
}
#endif
#endif