#include <net/pkt_cls.h>
#include <net/vxlan.h>
#include <net/geneve.h>
#include <net/tc_act/tc_ct.h>
#include "tc.h"
#include "tc_bindings.h"
#include "tc_encap_actions.h"
#include "tc_conntrack.h"
#include "mae.h"
#include "ef100_rep.h"
#include "efx.h"
enum efx_encap_type efx_tc_indr_netdev_type(struct net_device *net_dev)
{ … }
#define EFX_TC_HDR_TYPE_TTL_MASK …
#define EFX_TC_HDR_TYPE_HLIMIT_MASK …
#define EFX_EFV_PF …
struct efx_rep *efx_tc_flower_lookup_efv(struct efx_nic *efx,
struct net_device *dev)
{ … }
static s64 efx_tc_flower_internal_mport(struct efx_nic *efx, struct efx_rep *efv)
{ … }
s64 efx_tc_flower_external_mport(struct efx_nic *efx, struct efx_rep *efv)
{ … }
static const struct rhashtable_params efx_tc_mac_ht_params = …;
static const struct rhashtable_params efx_tc_encap_match_ht_params = …;
static const struct rhashtable_params efx_tc_match_action_ht_params = …;
static const struct rhashtable_params efx_tc_lhs_rule_ht_params = …;
static const struct rhashtable_params efx_tc_recirc_ht_params = …;
static struct efx_tc_mac_pedit_action *efx_tc_flower_get_mac(struct efx_nic *efx,
unsigned char h_addr[ETH_ALEN],
struct netlink_ext_ack *extack)
{ … }
static void efx_tc_flower_put_mac(struct efx_nic *efx,
struct efx_tc_mac_pedit_action *ped)
{ … }
static void efx_tc_free_action_set(struct efx_nic *efx,
struct efx_tc_action_set *act, bool in_hw)
{ … }
static void efx_tc_free_action_set_list(struct efx_nic *efx,
struct efx_tc_action_set_list *acts,
bool in_hw)
{ … }
#define _MAP_KEY_AND_MASK(_name, _type, _tcget, _tcfield, _field) …
#define MAP_KEY_AND_MASK(_name, _type, _tcfield, _field) …
#define MAP_ENC_KEY_AND_MASK(_name, _type, _tcget, _tcfield, _field) …
static int efx_tc_flower_parse_match(struct efx_nic *efx,
struct flow_rule *rule,
struct efx_tc_match *match,
struct netlink_ext_ack *extack)
{ … }
static void efx_tc_flower_release_encap_match(struct efx_nic *efx,
struct efx_tc_encap_match *encap)
{ … }
static int efx_tc_flower_record_encap_match(struct efx_nic *efx,
struct efx_tc_match *match,
enum efx_encap_type type,
enum efx_tc_em_pseudo_type em_type,
u8 child_ip_tos_mask,
__be16 child_udp_sport_mask,
struct netlink_ext_ack *extack)
{ … }
static struct efx_tc_recirc_id *efx_tc_get_recirc_id(struct efx_nic *efx,
u32 chain_index,
struct net_device *net_dev)
{ … }
static void efx_tc_put_recirc_id(struct efx_nic *efx, struct efx_tc_recirc_id *rid)
{ … }
static void efx_tc_delete_rule(struct efx_nic *efx, struct efx_tc_flow_rule *rule)
{ … }
static const char *efx_tc_encap_type_name(enum efx_encap_type typ)
{ … }
enum efx_tc_action_order { … };
static bool efx_tc_flower_action_order_ok(const struct efx_tc_action_set *act,
enum efx_tc_action_order new)
{ … }
static bool efx_tc_rule_is_lhs_rule(struct flow_rule *fr,
struct efx_tc_match *match)
{ … }
static int efx_tc_flower_translate_flhs_match(struct efx_tc_match *match)
{ … }
static bool efx_tc_flower_flhs_needs_ar(struct efx_tc_match *match)
{ … }
static int efx_tc_flower_handle_lhs_actions(struct efx_nic *efx,
struct flow_cls_offload *tc,
struct flow_rule *fr,
struct net_device *net_dev,
struct efx_tc_lhs_rule *rule)
{ … }
static void efx_tc_flower_release_lhs_actions(struct efx_nic *efx,
struct efx_tc_lhs_action *act)
{ … }
struct efx_tc_mangler_state { … };
static int efx_tc_complete_mac_mangle(struct efx_nic *efx,
struct efx_tc_action_set *act,
struct efx_tc_mangler_state *mung,
struct netlink_ext_ack *extack)
{ … }
static int efx_tc_pedit_add(struct efx_nic *efx, struct efx_tc_action_set *act,
const struct flow_action_entry *fa,
struct netlink_ext_ack *extack)
{ … }
static int efx_tc_mangle(struct efx_nic *efx, struct efx_tc_action_set *act,
const struct flow_action_entry *fa,
struct efx_tc_mangler_state *mung,
struct netlink_ext_ack *extack,
struct efx_tc_match *match)
{ … }
static int efx_tc_incomplete_mangle(struct efx_tc_mangler_state *mung,
struct netlink_ext_ack *extack)
{ … }
static int efx_tc_flower_replace_foreign_lhs_ar(struct efx_nic *efx,
struct flow_cls_offload *tc,
struct flow_rule *fr,
struct efx_tc_match *match,
struct net_device *net_dev)
{ … }
static int efx_tc_flower_replace_foreign_lhs(struct efx_nic *efx,
struct flow_cls_offload *tc,
struct flow_rule *fr,
struct efx_tc_match *match,
struct net_device *net_dev)
{ … }
static int efx_tc_flower_replace_foreign(struct efx_nic *efx,
struct net_device *net_dev,
struct flow_cls_offload *tc)
{ … }
static int efx_tc_flower_replace_lhs(struct efx_nic *efx,
struct flow_cls_offload *tc,
struct flow_rule *fr,
struct efx_tc_match *match,
struct efx_rep *efv,
struct net_device *net_dev)
{ … }
static int efx_tc_flower_replace(struct efx_nic *efx,
struct net_device *net_dev,
struct flow_cls_offload *tc,
struct efx_rep *efv)
{ … }
static int efx_tc_flower_destroy(struct efx_nic *efx,
struct net_device *net_dev,
struct flow_cls_offload *tc)
{ … }
static int efx_tc_flower_stats(struct efx_nic *efx, struct net_device *net_dev,
struct flow_cls_offload *tc)
{ … }
int efx_tc_flower(struct efx_nic *efx, struct net_device *net_dev,
struct flow_cls_offload *tc, struct efx_rep *efv)
{ … }
static int efx_tc_configure_default_rule(struct efx_nic *efx, u32 ing_port,
u32 eg_port, struct efx_tc_flow_rule *rule)
{ … }
static int efx_tc_configure_default_rule_pf(struct efx_nic *efx)
{ … }
static int efx_tc_configure_default_rule_wire(struct efx_nic *efx)
{ … }
int efx_tc_configure_default_rule_rep(struct efx_rep *efv)
{ … }
void efx_tc_deconfigure_default_rule(struct efx_nic *efx,
struct efx_tc_flow_rule *rule)
{ … }
static int efx_tc_configure_fallback_acts(struct efx_nic *efx, u32 eg_port,
struct efx_tc_action_set_list *acts)
{ … }
static int efx_tc_configure_fallback_acts_pf(struct efx_nic *efx)
{ … }
static int efx_tc_configure_fallback_acts_reps(struct efx_nic *efx)
{ … }
static void efx_tc_deconfigure_fallback_acts(struct efx_nic *efx,
struct efx_tc_action_set_list *acts)
{ … }
static int efx_tc_configure_rep_mport(struct efx_nic *efx)
{ … }
static void efx_tc_deconfigure_rep_mport(struct efx_nic *efx)
{ … }
int efx_tc_insert_rep_filters(struct efx_nic *efx)
{ … }
void efx_tc_remove_rep_filters(struct efx_nic *efx)
{ … }
int efx_init_tc(struct efx_nic *efx)
{ … }
void efx_fini_tc(struct efx_nic *efx)
{ … }
static void efx_tc_encap_match_free(void *ptr, void *__unused)
{ … }
static void efx_tc_recirc_free(void *ptr, void *arg)
{ … }
static void efx_tc_lhs_free(void *ptr, void *arg)
{ … }
static void efx_tc_mac_free(void *ptr, void *__unused)
{ … }
static void efx_tc_flow_free(void *ptr, void *arg)
{ … }
int efx_init_struct_tc(struct efx_nic *efx)
{ … }
void efx_fini_struct_tc(struct efx_nic *efx)
{ … }