#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_pedit.h>
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_vlan.h>
#include "cxgb4.h"
#include "cxgb4_filter.h"
#include "cxgb4_tc_flower.h"
#define STATS_CHECK_PERIOD …
static struct ch_tc_pedit_fields pedits[] = …;
static const struct cxgb4_natmode_config cxgb4_natmode_config_array[] = …;
static void cxgb4_action_natmode_tweak(struct ch_filter_specification *fs,
u8 natmode_flags)
{ … }
static struct ch_tc_flower_entry *allocate_flower_entry(void)
{ … }
static struct ch_tc_flower_entry *ch_flower_lookup(struct adapter *adap,
unsigned long flower_cookie)
{ … }
static void cxgb4_process_flow_match(struct net_device *dev,
struct flow_rule *rule,
struct ch_filter_specification *fs)
{ … }
static int cxgb4_validate_flow_match(struct netlink_ext_ack *extack,
struct flow_rule *rule)
{ … }
static void offload_pedit(struct ch_filter_specification *fs, u32 val, u32 mask,
u8 field)
{ … }
static void process_pedit_field(struct ch_filter_specification *fs, u32 val,
u32 mask, u32 offset, u8 htype,
u8 *natmode_flags)
{ … }
static int cxgb4_action_natmode_validate(struct adapter *adap, u8 natmode_flags,
struct netlink_ext_ack *extack)
{ … }
void cxgb4_process_flow_actions(struct net_device *in,
struct flow_action *actions,
struct ch_filter_specification *fs)
{ … }
static bool valid_l4_mask(u32 mask)
{ … }
static bool valid_pedit_action(struct netlink_ext_ack *extack,
const struct flow_action_entry *act,
u8 *natmode_flags)
{ … }
int cxgb4_validate_flow_actions(struct net_device *dev,
struct flow_action *actions,
struct netlink_ext_ack *extack,
u8 matchall_filter)
{ … }
static void cxgb4_tc_flower_hash_prio_add(struct adapter *adap, u32 tc_prio)
{ … }
static void cxgb4_tc_flower_hash_prio_del(struct adapter *adap, u32 tc_prio)
{ … }
int cxgb4_flow_rule_replace(struct net_device *dev, struct flow_rule *rule,
u32 tc_prio, struct netlink_ext_ack *extack,
struct ch_filter_specification *fs, u32 *tid)
{ … }
int cxgb4_tc_flower_replace(struct net_device *dev,
struct flow_cls_offload *cls)
{ … }
int cxgb4_flow_rule_destroy(struct net_device *dev, u32 tc_prio,
struct ch_filter_specification *fs, int tid)
{ … }
int cxgb4_tc_flower_destroy(struct net_device *dev,
struct flow_cls_offload *cls)
{ … }
static void ch_flower_stats_handler(struct work_struct *work)
{ … }
static void ch_flower_stats_cb(struct timer_list *t)
{ … }
int cxgb4_tc_flower_stats(struct net_device *dev,
struct flow_cls_offload *cls)
{ … }
static const struct rhashtable_params cxgb4_tc_flower_ht_params = …;
int cxgb4_init_tc_flower(struct adapter *adap)
{ … }
void cxgb4_cleanup_tc_flower(struct adapter *adap)
{ … }