#include <net/ipv6.h>
#include "cxgb4.h"
#include "t4_regs.h"
#include "t4_tcb.h"
#include "t4_values.h"
#include "clip_tbl.h"
#include "l2t.h"
#include "smt.h"
#include "t4fw_api.h"
#include "cxgb4_filter.h"
static inline bool is_field_set(u32 val, u32 mask)
{ … }
static inline bool unsupported(u32 conf, u32 conf_mask, u32 val, u32 mask)
{ … }
static int set_tcb_field(struct adapter *adap, struct filter_entry *f,
unsigned int ftid, u16 word, u64 mask, u64 val,
int no_reply)
{ … }
static int set_tcb_tflag(struct adapter *adap, struct filter_entry *f,
unsigned int ftid, unsigned int bit_pos,
unsigned int val, int no_reply)
{ … }
static void mk_abort_req_ulp(struct cpl_abort_req *abort_req, unsigned int tid)
{ … }
static void mk_abort_rpl_ulp(struct cpl_abort_rpl *abort_rpl, unsigned int tid)
{ … }
static void mk_set_tcb_ulp(struct filter_entry *f,
struct cpl_set_tcb_field *req,
unsigned int word, u64 mask, u64 val,
u8 cookie, int no_reply)
{ … }
static int configure_filter_smac(struct adapter *adap, struct filter_entry *f)
{ … }
static void set_nat_params(struct adapter *adap, struct filter_entry *f,
unsigned int tid, bool dip, bool sip, bool dp,
bool sp)
{ … }
static int validate_filter(struct net_device *dev,
struct ch_filter_specification *fs)
{ … }
static int get_filter_steerq(struct net_device *dev,
struct ch_filter_specification *fs)
{ … }
static int get_filter_count(struct adapter *adapter, unsigned int fidx,
u64 *pkts, u64 *bytes, bool hash)
{ … }
int cxgb4_get_filter_counters(struct net_device *dev, unsigned int fidx,
u64 *hitcnt, u64 *bytecnt, bool hash)
{ … }
static bool cxgb4_filter_prio_in_range(struct tid_info *t, u32 idx, u8 nslots,
u32 prio)
{ … }
int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
u32 tc_prio)
{ … }
static int cxgb4_set_ftid(struct tid_info *t, int fidx, int family,
unsigned int chip_ver)
{ … }
static int cxgb4_set_hpftid(struct tid_info *t, int fidx, int family)
{ … }
static void cxgb4_clear_ftid(struct tid_info *t, int fidx, int family,
unsigned int chip_ver)
{ … }
static void cxgb4_clear_hpftid(struct tid_info *t, int fidx, int family)
{ … }
static int del_filter_wr(struct adapter *adapter, int fidx)
{ … }
int set_filter_wr(struct adapter *adapter, int fidx)
{ … }
int writable_filter(struct filter_entry *f)
{ … }
int delete_filter(struct adapter *adapter, unsigned int fidx)
{ … }
void clear_filter(struct adapter *adap, struct filter_entry *f)
{ … }
void clear_all_filters(struct adapter *adapter)
{ … }
static void fill_default_mask(struct ch_filter_specification *fs)
{ … }
static bool is_addr_all_mask(u8 *ipmask, int family)
{ … }
static bool is_inaddr_any(u8 *ip, int family)
{ … }
bool is_filter_exact_match(struct adapter *adap,
struct ch_filter_specification *fs)
{ … }
static u64 hash_filter_ntuple(struct ch_filter_specification *fs,
struct net_device *dev)
{ … }
static void mk_act_open_req6(struct filter_entry *f, struct sk_buff *skb,
unsigned int qid_filterid, struct adapter *adap)
{ … }
static void mk_act_open_req(struct filter_entry *f, struct sk_buff *skb,
unsigned int qid_filterid, struct adapter *adap)
{ … }
static int cxgb4_set_hash_filter(struct net_device *dev,
struct ch_filter_specification *fs,
struct filter_ctx *ctx)
{ … }
int __cxgb4_set_filter(struct net_device *dev, int ftid,
struct ch_filter_specification *fs,
struct filter_ctx *ctx)
{ … }
static int cxgb4_del_hash_filter(struct net_device *dev, int filter_id,
struct filter_ctx *ctx)
{ … }
int __cxgb4_del_filter(struct net_device *dev, int filter_id,
struct ch_filter_specification *fs,
struct filter_ctx *ctx)
{ … }
int cxgb4_set_filter(struct net_device *dev, int filter_id,
struct ch_filter_specification *fs)
{ … }
int cxgb4_del_filter(struct net_device *dev, int filter_id,
struct ch_filter_specification *fs)
{ … }
static int configure_filter_tcb(struct adapter *adap, unsigned int tid,
struct filter_entry *f)
{ … }
void hash_del_filter_rpl(struct adapter *adap,
const struct cpl_abort_rpl_rss *rpl)
{ … }
void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
{ … }
void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl)
{ … }
void init_hash_filter(struct adapter *adap)
{ … }