#include <net/tc_act/tc_gate.h>
#include <net/tcp.h>
#include "sparx5_tc.h"
#include "vcap_api.h"
#include "vcap_api_client.h"
#include "vcap_tc.h"
#include "sparx5_main.h"
#include "sparx5_vcap_impl.h"
#define SPX5_MAX_RULE_SIZE …
struct sparx5_wildcard_rule { … };
struct sparx5_multiple_rules { … };
struct sparx5_tc_flower_template { … };
enum { … };
static const u8 sparx5_vcap_frag_map[4][4] = …;
static int
sparx5_tc_flower_es0_tpid(struct vcap_tc_flower_parse_usage *st)
{ … }
static int
sparx5_tc_flower_handler_basic_usage(struct vcap_tc_flower_parse_usage *st)
{ … }
static int
sparx5_tc_flower_handler_control_usage(struct vcap_tc_flower_parse_usage *st)
{ … }
static int
sparx5_tc_flower_handler_cvlan_usage(struct vcap_tc_flower_parse_usage *st)
{ … }
static int
sparx5_tc_flower_handler_vlan_usage(struct vcap_tc_flower_parse_usage *st)
{ … }
static int (*sparx5_tc_flower_usage_handlers[])(struct vcap_tc_flower_parse_usage *st) = …;
static int sparx5_tc_use_dissectors(struct vcap_tc_flower_parse_usage *st,
struct vcap_admin *admin,
struct vcap_rule *vrule)
{ … }
static int sparx5_tc_flower_action_check(struct vcap_control *vctrl,
struct net_device *ndev,
struct flow_cls_offload *fco,
bool ingress)
{ … }
static int sparx5_tc_add_rule_counter(struct vcap_admin *admin,
struct vcap_rule *vrule)
{ … }
static int sparx5_tc_select_protocol_keyset(struct net_device *ndev,
struct vcap_rule *vrule,
struct vcap_admin *admin,
u16 l3_proto,
struct sparx5_multiple_rules *multi)
{ … }
static int sparx5_tc_add_rule_copy(struct vcap_control *vctrl,
struct flow_cls_offload *fco,
struct vcap_rule *erule,
struct vcap_admin *admin,
struct sparx5_wildcard_rule *rule)
{ … }
static int sparx5_tc_add_remaining_rules(struct vcap_control *vctrl,
struct flow_cls_offload *fco,
struct vcap_rule *erule,
struct vcap_admin *admin,
struct sparx5_multiple_rules *multi)
{ … }
static int sparx5_tc_set_actionset(struct vcap_admin *admin,
struct vcap_rule *vrule)
{ … }
static int sparx5_tc_add_rule_link_target(struct vcap_admin *admin,
struct vcap_rule *vrule,
int target_cid)
{ … }
static int sparx5_tc_add_rule_link(struct vcap_control *vctrl,
struct vcap_admin *admin,
struct vcap_rule *vrule,
int from_cid, int to_cid)
{ … }
static int sparx5_tc_flower_parse_act_gate(struct sparx5_psfp_sg *sg,
struct flow_action_entry *act,
struct netlink_ext_ack *extack)
{ … }
static int sparx5_tc_flower_parse_act_police(struct sparx5_policer *pol,
struct flow_action_entry *act,
struct netlink_ext_ack *extack)
{ … }
static int sparx5_tc_flower_psfp_setup(struct sparx5 *sparx5,
struct vcap_rule *vrule, int sg_idx,
int pol_idx, struct sparx5_psfp_sg *sg,
struct sparx5_psfp_fm *fm,
struct sparx5_psfp_sf *sf)
{ … }
static int sparx5_tc_action_trap(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco)
{ … }
static int sparx5_tc_action_vlan_pop(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco,
u16 tpid)
{ … }
static int sparx5_tc_action_vlan_modify(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco,
struct flow_action_entry *act,
u16 tpid)
{ … }
static int sparx5_tc_action_vlan_push(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco,
struct flow_action_entry *act,
u16 tpid)
{ … }
static void sparx5_tc_flower_set_port_mask(struct vcap_u72_action *ports,
struct net_device *ndev)
{ … }
static int sparx5_tc_action_mirred(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco,
struct flow_action_entry *act)
{ … }
static int sparx5_tc_action_redirect(struct vcap_admin *admin,
struct vcap_rule *vrule,
struct flow_cls_offload *fco,
struct flow_action_entry *act)
{ … }
static void sparx5_tc_flower_simplify_rule(struct vcap_admin *admin,
struct vcap_rule *vrule,
u16 l3_proto)
{ … }
static bool sparx5_tc_flower_use_template(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin,
struct vcap_rule *vrule)
{ … }
static int sparx5_tc_flower_replace(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin,
bool ingress)
{ … }
static void sparx5_tc_free_psfp_resources(struct sparx5 *sparx5,
struct vcap_rule *vrule)
{ … }
static int sparx5_tc_free_rule_resources(struct net_device *ndev,
struct vcap_control *vctrl,
int rule_id)
{ … }
static int sparx5_tc_flower_destroy(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin)
{ … }
static int sparx5_tc_flower_stats(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin)
{ … }
static int sparx5_tc_flower_template_create(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin)
{ … }
static int sparx5_tc_flower_template_destroy(struct net_device *ndev,
struct flow_cls_offload *fco,
struct vcap_admin *admin)
{ … }
int sparx5_tc_flower(struct net_device *ndev, struct flow_cls_offload *fco,
bool ingress)
{ … }