0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef EFX_TC_H
0013 #define EFX_TC_H
0014 #include "net_driver.h"
0015
0016 struct efx_tc_action_set {
0017 u16 deliver:1;
0018 u32 dest_mport;
0019 u32 fw_id;
0020 struct list_head list;
0021 };
0022
0023 struct efx_tc_match_fields {
0024
0025 u32 ingress_port;
0026 };
0027
0028 struct efx_tc_match {
0029 struct efx_tc_match_fields value;
0030 struct efx_tc_match_fields mask;
0031 };
0032
0033 struct efx_tc_action_set_list {
0034 struct list_head list;
0035 u32 fw_id;
0036 };
0037
0038 struct efx_tc_flow_rule {
0039 struct efx_tc_match match;
0040 struct efx_tc_action_set_list acts;
0041 u32 fw_id;
0042 };
0043
0044 enum efx_tc_rule_prios {
0045 EFX_TC_PRIO_DFLT,
0046 EFX_TC_PRIO__NUM
0047 };
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 struct efx_tc_state {
0062 u32 reps_mport_id, reps_mport_vport_id;
0063 s32 reps_filter_uc, reps_filter_mc;
0064 struct {
0065 struct efx_tc_flow_rule pf;
0066 struct efx_tc_flow_rule wire;
0067 } dflt;
0068 };
0069
0070 struct efx_rep;
0071
0072 int efx_tc_configure_default_rule_rep(struct efx_rep *efv);
0073 void efx_tc_deconfigure_default_rule(struct efx_nic *efx,
0074 struct efx_tc_flow_rule *rule);
0075
0076 int efx_tc_insert_rep_filters(struct efx_nic *efx);
0077 void efx_tc_remove_rep_filters(struct efx_nic *efx);
0078
0079 int efx_init_tc(struct efx_nic *efx);
0080 void efx_fini_tc(struct efx_nic *efx);
0081
0082 int efx_init_struct_tc(struct efx_nic *efx);
0083 void efx_fini_struct_tc(struct efx_nic *efx);
0084
0085 #endif