FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
avf_advanced_flow.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  virtchnl_proto_hdr
 
struct  virtchnl_proto_hdrs
 
struct  virtchnl_rss_key
 
struct  virtchnl_rss_lut
 
struct  virtchnl_rss_hena
 
struct  virtchnl_rss_cfg
 
struct  virtchnl_filter_action
 
struct  virtchnl_filter_action_set
 
struct  virtchnl_fdir_rule
 
struct  virtchnl_fdir_query_info
 
struct  virtchnl_fdir_add
 
struct  virtchnl_fdir_del
 
struct  virtchnl_fdir_query
 
struct  avf_flow_error
 Verbose error structure definition. More...
 
struct  avf_ether_addr
 
struct  avf_flow_eth_hdr
 
struct  avf_ipv4_hdr
 IPv4 Header. More...
 
struct  avf_ipv6_hdr
 IPv6 Header. More...
 
struct  avf_tcp_hdr
 TCP Header. More...
 
struct  avf_udp_hdr
 UDP Header. More...
 
struct  avf_ah_hdr
 Match IP Authentication Header (AH), RFC 4302. More...
 
struct  avf_esp_hdr
 ESP Header. More...
 
struct  avf_pfcp_hdr
 Match PFCP Header. More...
 
struct  avf_l2tpv3oip_hdr
 Matches a L2TPv3 over IP header. More...
 
struct  avf_gtp_psc_hdr
 Matches a GTP PDU extension header with type 0x85. More...
 
struct  avf_gtp_hdr
 Matches a GTPv1 header. More...
 
struct  avf_sctp_hdr
 SCTP Header. More...
 
struct  avf_flow_action_rss
 
struct  avf_flow_action_queue
 
struct  avf_flow_action_mark
 
struct  avf_flow_action
 
struct  avf_flow_item
 
struct  avf_fdir_conf
 
struct  avf_fdir_vc_ctx
 

Macros

#define AVF_SUCCESS   (0)
 
#define AVF_FAILURE   (-1)
 
#define BIT(a)   (1UL << (a))
 
#define BIT_ULL(a)   (1ULL << (a))
 
#define VIRTCHNL_CHECK_STRUCT_LEN(n, X)
 
#define VIRTCHNL_CHECK_UNION_LEN(n, X)
 
#define AVF_ETHER_TYPE_IPV4   0x0800
 IPv4 Protocol. More...
 
#define AVF_ETHER_TYPE_IPV6   0x86DD
 IPv6 Protocol. More...
 
#define VIRTCHNL_MAX_NUM_PROTO_HDRS   32
 
#define PROTO_HDR_SHIFT   5
 
#define PROTO_HDR_FIELD_START(proto_hdr_type)   (proto_hdr_type << PROTO_HDR_SHIFT)
 
#define PROTO_HDR_FIELD_MASK   ((1UL << PROTO_HDR_SHIFT) - 1)
 
#define VIRTCHNL_ADD_PROTO_HDR_FIELD(hdr, field)   ((hdr)->field_selector |= BIT ((field) &PROTO_HDR_FIELD_MASK))
 
#define VIRTCHNL_DEL_PROTO_HDR_FIELD(hdr, field)   ((hdr)->field_selector &= ~BIT ((field) &PROTO_HDR_FIELD_MASK))
 
#define VIRTCHNL_TEST_PROTO_HDR_FIELD(hdr, val)   ((hdr)->field_selector & BIT ((val) &PROTO_HDR_FIELD_MASK))
 
#define VIRTCHNL_GET_PROTO_HDR_FIELD(hdr)   ((hdr)->field_selector)
 
#define VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, hdr_type, field)   (VIRTCHNL_ADD_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))
 
#define VIRTCHNL_DEL_PROTO_HDR_FIELD_BIT(hdr, hdr_type, field)   (VIRTCHNL_DEL_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))
 
#define VIRTCHNL_SET_PROTO_HDR_TYPE(hdr, hdr_type)   ((hdr)->type = VIRTCHNL_PROTO_HDR_##hdr_type)
 
#define VIRTCHNL_GET_PROTO_HDR_TYPE(hdr)   (((hdr)->type) >> PROTO_HDR_SHIFT)
 
#define VIRTCHNL_TEST_PROTO_HDR_TYPE(hdr, val)   ((hdr)->type == ((val) >> PROTO_HDR_SHIFT))
 
#define VIRTCHNL_TEST_PROTO_HDR(hdr, val)
 
#define AVF_PROT_MAC_INNER   (1ULL << 1)
 
#define AVF_PROT_MAC_OUTER   (1ULL << 2)
 
#define AVF_PROT_VLAN_INNER   (1ULL << 3)
 
#define AVF_PROT_VLAN_OUTER   (1ULL << 4)
 
#define AVF_PROT_IPV4_INNER   (1ULL << 5)
 
#define AVF_PROT_IPV4_OUTER   (1ULL << 6)
 
#define AVF_PROT_IPV6_INNER   (1ULL << 7)
 
#define AVF_PROT_IPV6_OUTER   (1ULL << 8)
 
#define AVF_PROT_TCP_INNER   (1ULL << 9)
 
#define AVF_PROT_TCP_OUTER   (1ULL << 10)
 
#define AVF_PROT_UDP_INNER   (1ULL << 11)
 
#define AVF_PROT_UDP_OUTER   (1ULL << 12)
 
#define AVF_PROT_SCTP_INNER   (1ULL << 13)
 
#define AVF_PROT_SCTP_OUTER   (1ULL << 14)
 
#define AVF_PROT_ICMP4_INNER   (1ULL << 15)
 
#define AVF_PROT_ICMP4_OUTER   (1ULL << 16)
 
#define AVF_PROT_ICMP6_INNER   (1ULL << 17)
 
#define AVF_PROT_ICMP6_OUTER   (1ULL << 18)
 
#define AVF_PROT_VXLAN   (1ULL << 19)
 
#define AVF_PROT_NVGRE   (1ULL << 20)
 
#define AVF_PROT_GTPU   (1ULL << 21)
 
#define AVF_PROT_ESP   (1ULL << 22)
 
#define AVF_PROT_AH   (1ULL << 23)
 
#define AVF_PROT_L2TPV3OIP   (1ULL << 24)
 
#define AVF_PROT_PFCP   (1ULL << 25)
 
#define AVF_SMAC   (1ULL << 63)
 
#define AVF_DMAC   (1ULL << 62)
 
#define AVF_ETHERTYPE   (1ULL << 61)
 
#define AVF_IP_SRC   (1ULL << 60)
 
#define AVF_IP_DST   (1ULL << 59)
 
#define AVF_IP_PROTO   (1ULL << 58)
 
#define AVF_IP_TTL   (1ULL << 57)
 
#define AVF_IP_TOS   (1ULL << 56)
 
#define AVF_SPORT   (1ULL << 55)
 
#define AVF_DPORT   (1ULL << 54)
 
#define AVF_ICMP_TYPE   (1ULL << 53)
 
#define AVF_ICMP_CODE   (1ULL << 52)
 
#define AVF_VXLAN_VNI   (1ULL << 51)
 
#define AVF_NVGRE_TNI   (1ULL << 50)
 
#define AVF_GTPU_TEID   (1ULL << 49)
 
#define AVF_GTPU_QFI   (1ULL << 48)
 
#define AVF_ESP_SPI   (1ULL << 47)
 
#define AVF_AH_SPI   (1ULL << 46)
 
#define AVF_L2TPV3OIP_SESSION_ID   (1ULL << 45)
 
#define AVF_PFCP_S_FIELD   (1ULL << 44)
 
#define AVF_PFCP_SEID   (1ULL << 43)
 
#define AVF_INSET_NONE   0ULL
 
#define AVF_INSET_SMAC   (AVF_PROT_MAC_OUTER | AVF_SMAC)
 
#define AVF_INSET_DMAC   (AVF_PROT_MAC_OUTER | AVF_DMAC)
 
#define AVF_INSET_VLAN_INNER   (AVF_PROT_VLAN_INNER)
 
#define AVF_INSET_VLAN_OUTER   (AVF_PROT_VLAN_OUTER)
 
#define AVF_INSET_ETHERTYPE   (AVF_ETHERTYPE)
 
#define AVF_INSET_IPV4_SRC   (AVF_PROT_IPV4_OUTER | AVF_IP_SRC)
 
#define AVF_INSET_IPV4_DST   (AVF_PROT_IPV4_OUTER | AVF_IP_DST)
 
#define AVF_INSET_IPV4_TOS   (AVF_PROT_IPV4_OUTER | AVF_IP_TOS)
 
#define AVF_INSET_IPV4_PROTO   (AVF_PROT_IPV4_OUTER | AVF_IP_PROTO)
 
#define AVF_INSET_IPV4_TTL   (AVF_PROT_IPV4_OUTER | AVF_IP_TTL)
 
#define AVF_INSET_IPV6_SRC   (AVF_PROT_IPV6_OUTER | AVF_IP_SRC)
 
#define AVF_INSET_IPV6_DST   (AVF_PROT_IPV6_OUTER | AVF_IP_DST)
 
#define AVF_INSET_IPV6_NEXT_HDR   (AVF_PROT_IPV6_OUTER | AVF_IP_PROTO)
 
#define AVF_INSET_IPV6_HOP_LIMIT   (AVF_PROT_IPV6_OUTER | AVF_IP_TTL)
 
#define AVF_INSET_IPV6_TC   (AVF_PROT_IPV6_OUTER | AVF_IP_TOS)
 
#define AVF_INSET_TCP_SRC_PORT   (AVF_PROT_TCP_OUTER | AVF_SPORT)
 
#define AVF_INSET_TCP_DST_PORT   (AVF_PROT_TCP_OUTER | AVF_DPORT)
 
#define AVF_INSET_UDP_SRC_PORT   (AVF_PROT_UDP_OUTER | AVF_SPORT)
 
#define AVF_INSET_UDP_DST_PORT   (AVF_PROT_UDP_OUTER | AVF_DPORT)
 
#define AVF_INSET_SCTP_SRC_PORT   (AVF_PROT_SCTP_OUTER | AVF_SPORT)
 
#define AVF_INSET_SCTP_DST_PORT   (AVF_PROT_SCTP_OUTER | AVF_DPORT)
 
#define AVF_INSET_ICMP4_SRC_PORT   (AVF_PROT_ICMP4_OUTER | AVF_SPORT)
 
#define AVF_INSET_ICMP4_DST_PORT   (AVF_PROT_ICMP4_OUTER | AVF_DPORT)
 
#define AVF_INSET_ICMP6_SRC_PORT   (AVF_PROT_ICMP6_OUTER | AVF_SPORT)
 
#define AVF_INSET_ICMP6_DST_PORT   (AVF_PROT_ICMP6_OUTER | AVF_DPORT)
 
#define AVF_INSET_ICMP4_TYPE   (AVF_PROT_ICMP4_OUTER | AVF_ICMP_TYPE)
 
#define AVF_INSET_ICMP4_CODE   (AVF_PROT_ICMP4_OUTER | AVF_ICMP_CODE)
 
#define AVF_INSET_ICMP6_TYPE   (AVF_PROT_ICMP6_OUTER | AVF_ICMP_TYPE)
 
#define AVF_INSET_ICMP6_CODE   (AVF_PROT_ICMP6_OUTER | AVF_ICMP_CODE)
 
#define AVF_INSET_GTPU_TEID   (AVF_PROT_GTPU | AVF_GTPU_TEID)
 
#define AVF_INSET_GTPU_QFI   (AVF_PROT_GTPU | AVF_GTPU_QFI)
 
#define AVF_INSET_ESP_SPI   (AVF_PROT_ESP | AVF_ESP_SPI)
 
#define AVF_INSET_AH_SPI   (AVF_PROT_AH | AVF_AH_SPI)
 
#define AVF_INSET_L2TPV3OIP_SESSION_ID   (AVF_PROT_L2TPV3OIP | AVF_L2TPV3OIP_SESSION_ID)
 
#define AVF_INSET_PFCP_S_FIELD   (AVF_PROT_PFCP | AVF_PFCP_S_FIELD)
 
#define AVF_INSET_PFCP_SEID   (AVF_PROT_PFCP | AVF_PFCP_S_FIELD | AVF_PFCP_SEID)
 
#define VIRTCHNL_MAX_NUM_ACTIONS   8
 
#define AVF_ETHER_ADDR_LEN   6
 

Typedefs

typedef int(* avf_fdir_vc_op_t) (void *vc_hdl, enum virthnl_adv_ops vc_op, void *in, u32 in_len, void *out, u32 out_len)
 

Enumerations

enum  virtchnl_proto_hdr_type {
  VIRTCHNL_PROTO_HDR_NONE, VIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_S_VLAN, VIRTCHNL_PROTO_HDR_C_VLAN,
  VIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_UDP,
  VIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_GTPU_IP, VIRTCHNL_PROTO_HDR_GTPU_EH, VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN,
  VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, VIRTCHNL_PROTO_HDR_PPPOE, VIRTCHNL_PROTO_HDR_L2TPV3, VIRTCHNL_PROTO_HDR_ESP,
  VIRTCHNL_PROTO_HDR_AH, VIRTCHNL_PROTO_HDR_PFCP
}
 
enum  virtchnl_proto_hdr_field {
  VIRTCHNL_PROTO_HDR_ETH_SRC = PROTO_HDR_FIELD_START (VIRTCHNL_PROTO_HDR_ETH), VIRTCHNL_PROTO_HDR_ETH_DST, VIRTCHNL_PROTO_HDR_ETH_ETHERTYPE, VIRTCHNL_PROTO_HDR_S_VLAN_ID,
  VIRTCHNL_PROTO_HDR_C_VLAN_ID, VIRTCHNL_PROTO_HDR_IPV4_SRC, VIRTCHNL_PROTO_HDR_IPV4_DST, VIRTCHNL_PROTO_HDR_IPV4_DSCP,
  VIRTCHNL_PROTO_HDR_IPV4_TTL, VIRTCHNL_PROTO_HDR_IPV4_PROT, VIRTCHNL_PROTO_HDR_IPV6_SRC, VIRTCHNL_PROTO_HDR_IPV6_DST,
  VIRTCHNL_PROTO_HDR_IPV6_TC, VIRTCHNL_PROTO_HDR_IPV6_HOP_LIMIT, VIRTCHNL_PROTO_HDR_IPV6_PROT, VIRTCHNL_PROTO_HDR_TCP_SRC_PORT,
  VIRTCHNL_PROTO_HDR_TCP_DST_PORT, VIRTCHNL_PROTO_HDR_UDP_SRC_PORT, VIRTCHNL_PROTO_HDR_UDP_DST_PORT, VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT,
  VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, VIRTCHNL_PROTO_HDR_GTPU_IP_TEID, VIRTCHNL_PROTO_HDR_GTPU_EH_PDU, VIRTCHNL_PROTO_HDR_GTPU_EH_QFI,
  VIRTCHNL_PROTO_HDR_PPPOE_SESS_ID, VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID, VIRTCHNL_PROTO_HDR_ESP_SPI = PROTO_HDR_FIELD_START (VIRTCHNL_PROTO_HDR_ESP), VIRTCHNL_PROTO_HDR_AH_SPI = PROTO_HDR_FIELD_START (VIRTCHNL_PROTO_HDR_AH),
  VIRTCHNL_PROTO_HDR_PFCP_S_FIELD, VIRTCHNL_PROTO_HDR_PFCP_SEID
}
 
enum  virtchnl_rss_algorithm { VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC = 0, VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC = 1, VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC = 2, VIRTCHNL_RSS_ALG_XOR_SYMMETRIC = 3 }
 
enum  virtchnl_action {
  VIRTCHNL_ACTION_DROP = 0, VIRTCHNL_ACTION_TC_REDIRECT, VIRTCHNL_ACTION_PASSTHRU, VIRTCHNL_ACTION_QUEUE,
  VIRTCHNL_ACTION_Q_REGION, VIRTCHNL_ACTION_MARK, VIRTCHNL_ACTION_COUNT, VIRTCHNL_ACTION_NONE
}
 
enum  virtchnl_fdir_prgm_status {
  VIRTCHNL_FDIR_SUCCESS = 0, VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE, VIRTCHNL_FDIR_FAILURE_RULE_EXIST, VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,
  VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST, VIRTCHNL_FDIR_FAILURE_RULE_INVALID, VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT, VIRTCHNL_FDIR_FAILURE_QUERY_INVALID,
  VIRTCHNL_FDIR_FAILURE_MAX
}
 
enum  avf_flow_error_type {
  AVF_FLOW_ERROR_TYPE_NONE, AVF_FLOW_ERROR_TYPE_UNSPECIFIED, AVF_FLOW_ERROR_TYPE_HANDLE, AVF_FLOW_ERROR_TYPE_ATTR_GROUP,
  AVF_FLOW_ERROR_TYPE_ATTR_PRIORITY, AVF_FLOW_ERROR_TYPE_ATTR_INGRESS, AVF_FLOW_ERROR_TYPE_ATTR_EGRESS, AVF_FLOW_ERROR_TYPE_ATTR_TRANSFER,
  AVF_FLOW_ERROR_TYPE_ATTR, AVF_FLOW_ERROR_TYPE_ITEM_NUM, AVF_FLOW_ERROR_TYPE_ITEM_SPEC, AVF_FLOW_ERROR_TYPE_ITEM_LAST,
  AVF_FLOW_ERROR_TYPE_ITEM_MASK, AVF_FLOW_ERROR_TYPE_ITEM, AVF_FLOW_ERROR_TYPE_ACTION_NUM, AVF_FLOW_ERROR_TYPE_ACTION_CONF,
  AVF_FLOW_ERROR_TYPE_ACTION
}
 Those headers used temporary, maybe OS packet definition can replace. More...
 
enum  avf_eth_hash_function {
  AVF_ETH_HASH_FUNCTION_DEFAULT = 0, AVF_ETH_HASH_FUNCTION_TOEPLITZ, AVF_ETH_HASH_FUNCTION_SIMPLE_XOR, AVF_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ,
  AVF_ETH_HASH_FUNCTION_MAX
}
 Hash function types. More...
 
enum  virthnl_adv_ops { VIRTCHNL_ADV_OP_ADD_FDIR_FILTER = 0, VIRTCHNL_ADV_OP_DEL_FDIR_FILTER, VIRTCHNL_ADV_OP_QUERY_FDIR_FILTER, VIRTCHNL_ADV_OP_MAX }
 

Functions

 VIRTCHNL_CHECK_STRUCT_LEN (72, virtchnl_proto_hdr)
 
 VIRTCHNL_CHECK_STRUCT_LEN (2312, virtchnl_proto_hdrs)
 
 VIRTCHNL_CHECK_STRUCT_LEN (6, virtchnl_rss_key)
 
 VIRTCHNL_CHECK_STRUCT_LEN (6, virtchnl_rss_lut)
 
 VIRTCHNL_CHECK_STRUCT_LEN (8, virtchnl_rss_hena)
 
 VIRTCHNL_CHECK_STRUCT_LEN (2444, virtchnl_rss_cfg)
 
 VIRTCHNL_CHECK_STRUCT_LEN (36, virtchnl_filter_action)
 
 VIRTCHNL_CHECK_STRUCT_LEN (292, virtchnl_filter_action_set)
 
 VIRTCHNL_CHECK_STRUCT_LEN (2604, virtchnl_fdir_rule)
 
 VIRTCHNL_CHECK_STRUCT_LEN (24, virtchnl_fdir_query_info)
 
 VIRTCHNL_CHECK_STRUCT_LEN (2616, virtchnl_fdir_add)
 
 VIRTCHNL_CHECK_STRUCT_LEN (12, virtchnl_fdir_del)
 
 VIRTCHNL_CHECK_STRUCT_LEN (48, virtchnl_fdir_query)
 
int avf_fdir_rcfg_create (struct avf_fdir_conf **rcfg, int tunnel_level, u16 vsi, u16 nrxq)
 Create a rule cfg object. More...
 
int avf_fdir_rcfg_destroy (struct avf_fdir_conf *rcfg)
 Destroy a rule cfg object. More...
 
int avf_fdir_rcfg_set_hdr (struct avf_fdir_conf *rcfg, int layer, enum virtchnl_proto_hdr_type hdr)
 Set match potocol header on specific layer, it will overwrite is already be set. More...
 
int avf_fdir_rcfg_set_field (struct avf_fdir_conf *rcfg, int layer, struct avf_flow_item *item, struct avf_flow_error *error)
 Set a match field on specific protocol layer, if any match field already be set on this layer, it will be overwritten. More...
 
int avf_fdir_rcfg_act_queue (struct avf_fdir_conf *rcfg, int queue, int size, int act_idx)
 Set action as to queue(group), conflict with drop action. More...
 
int avf_fdir_parse_action_qregion (struct avf_fdir_conf *rcfg, const struct avf_flow_action *act, int act_idx, struct avf_flow_error *error)
 Set action as to queue group, conflict with drop action. More...
 
int avf_fdir_rcfg_act_drop (struct avf_fdir_conf *rcfg, int act_idx)
 Set action as as drop, conflict with to queue(gropu) action. More...
 
int avf_fdir_rcfg_act_mark (struct avf_fdir_conf *rcfg, const u32 mark, int act_idx)
 Set action as mark, it can co-exist with to queue(group) or drop action. More...
 
int avf_fdir_rcfg_validate (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
 Validate a flow rule cfg, check with PF driver if the rule cfg is supportted or not. More...
 
int avf_fdir_rule_create (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
 Create a flow rule, a FDIR rule is expected to be programmed into hardware if return success. More...
 
int avf_fdir_rule_destroy (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg)
 Destroy a flow rule. More...
 
int avf_fdir_parse_pattern (struct avf_fdir_conf *rcfg, struct avf_flow_item avf_items[], struct avf_flow_error *error)
 
int avf_fdir_parse_action (const struct avf_flow_action actions[], struct avf_fdir_conf *rcfg, struct avf_flow_error *error)
 
int avf_flow_error_set (struct avf_flow_error *error, int code, enum avf_flow_error_type type, const void *cause, const char *message)
 Initialize flow error structure. More...
 
char * avf_fdir_prgm_error_decode (int err_no)
 

Macro Definition Documentation

◆ AVF_AH_SPI

#define AVF_AH_SPI   (1ULL << 46)

Definition at line 129 of file avf_advanced_flow.h.

◆ AVF_DMAC

#define AVF_DMAC   (1ULL << 62)

Definition at line 113 of file avf_advanced_flow.h.

◆ AVF_DPORT

#define AVF_DPORT   (1ULL << 54)

Definition at line 121 of file avf_advanced_flow.h.

◆ AVF_ESP_SPI

#define AVF_ESP_SPI   (1ULL << 47)

Definition at line 128 of file avf_advanced_flow.h.

◆ AVF_ETHER_ADDR_LEN

#define AVF_ETHER_ADDR_LEN   6

Definition at line 571 of file avf_advanced_flow.h.

◆ AVF_ETHER_TYPE_IPV4

#define AVF_ETHER_TYPE_IPV4   0x0800

IPv4 Protocol.

Definition at line 44 of file avf_advanced_flow.h.

◆ AVF_ETHER_TYPE_IPV6

#define AVF_ETHER_TYPE_IPV6   0x86DD

IPv6 Protocol.

Definition at line 45 of file avf_advanced_flow.h.

◆ AVF_ETHERTYPE

#define AVF_ETHERTYPE   (1ULL << 61)

Definition at line 114 of file avf_advanced_flow.h.

◆ AVF_FAILURE

#define AVF_FAILURE   (-1)

Definition at line 22 of file avf_advanced_flow.h.

◆ AVF_GTPU_QFI

#define AVF_GTPU_QFI   (1ULL << 48)

Definition at line 127 of file avf_advanced_flow.h.

◆ AVF_GTPU_TEID

#define AVF_GTPU_TEID   (1ULL << 49)

Definition at line 126 of file avf_advanced_flow.h.

◆ AVF_ICMP_CODE

#define AVF_ICMP_CODE   (1ULL << 52)

Definition at line 123 of file avf_advanced_flow.h.

◆ AVF_ICMP_TYPE

#define AVF_ICMP_TYPE   (1ULL << 53)

Definition at line 122 of file avf_advanced_flow.h.

◆ AVF_INSET_AH_SPI

#define AVF_INSET_AH_SPI   (AVF_PROT_AH | AVF_AH_SPI)

Definition at line 174 of file avf_advanced_flow.h.

◆ AVF_INSET_DMAC

#define AVF_INSET_DMAC   (AVF_PROT_MAC_OUTER | AVF_DMAC)

Definition at line 141 of file avf_advanced_flow.h.

◆ AVF_INSET_ESP_SPI

#define AVF_INSET_ESP_SPI   (AVF_PROT_ESP | AVF_ESP_SPI)

Definition at line 173 of file avf_advanced_flow.h.

◆ AVF_INSET_ETHERTYPE

#define AVF_INSET_ETHERTYPE   (AVF_ETHERTYPE)

Definition at line 144 of file avf_advanced_flow.h.

◆ AVF_INSET_GTPU_QFI

#define AVF_INSET_GTPU_QFI   (AVF_PROT_GTPU | AVF_GTPU_QFI)

Definition at line 172 of file avf_advanced_flow.h.

◆ AVF_INSET_GTPU_TEID

#define AVF_INSET_GTPU_TEID   (AVF_PROT_GTPU | AVF_GTPU_TEID)

Definition at line 171 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP4_CODE

#define AVF_INSET_ICMP4_CODE   (AVF_PROT_ICMP4_OUTER | AVF_ICMP_CODE)

Definition at line 168 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP4_DST_PORT

#define AVF_INSET_ICMP4_DST_PORT   (AVF_PROT_ICMP4_OUTER | AVF_DPORT)

Definition at line 164 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP4_SRC_PORT

#define AVF_INSET_ICMP4_SRC_PORT   (AVF_PROT_ICMP4_OUTER | AVF_SPORT)

Definition at line 163 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP4_TYPE

#define AVF_INSET_ICMP4_TYPE   (AVF_PROT_ICMP4_OUTER | AVF_ICMP_TYPE)

Definition at line 167 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP6_CODE

#define AVF_INSET_ICMP6_CODE   (AVF_PROT_ICMP6_OUTER | AVF_ICMP_CODE)

Definition at line 170 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP6_DST_PORT

#define AVF_INSET_ICMP6_DST_PORT   (AVF_PROT_ICMP6_OUTER | AVF_DPORT)

Definition at line 166 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP6_SRC_PORT

#define AVF_INSET_ICMP6_SRC_PORT   (AVF_PROT_ICMP6_OUTER | AVF_SPORT)

Definition at line 165 of file avf_advanced_flow.h.

◆ AVF_INSET_ICMP6_TYPE

#define AVF_INSET_ICMP6_TYPE   (AVF_PROT_ICMP6_OUTER | AVF_ICMP_TYPE)

Definition at line 169 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV4_DST

#define AVF_INSET_IPV4_DST   (AVF_PROT_IPV4_OUTER | AVF_IP_DST)

Definition at line 147 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV4_PROTO

#define AVF_INSET_IPV4_PROTO   (AVF_PROT_IPV4_OUTER | AVF_IP_PROTO)

Definition at line 149 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV4_SRC

#define AVF_INSET_IPV4_SRC   (AVF_PROT_IPV4_OUTER | AVF_IP_SRC)

Definition at line 146 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV4_TOS

#define AVF_INSET_IPV4_TOS   (AVF_PROT_IPV4_OUTER | AVF_IP_TOS)

Definition at line 148 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV4_TTL

#define AVF_INSET_IPV4_TTL   (AVF_PROT_IPV4_OUTER | AVF_IP_TTL)

Definition at line 150 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV6_DST

#define AVF_INSET_IPV6_DST   (AVF_PROT_IPV6_OUTER | AVF_IP_DST)

Definition at line 152 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV6_HOP_LIMIT

#define AVF_INSET_IPV6_HOP_LIMIT   (AVF_PROT_IPV6_OUTER | AVF_IP_TTL)

Definition at line 154 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV6_NEXT_HDR

#define AVF_INSET_IPV6_NEXT_HDR   (AVF_PROT_IPV6_OUTER | AVF_IP_PROTO)

Definition at line 153 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV6_SRC

#define AVF_INSET_IPV6_SRC   (AVF_PROT_IPV6_OUTER | AVF_IP_SRC)

Definition at line 151 of file avf_advanced_flow.h.

◆ AVF_INSET_IPV6_TC

#define AVF_INSET_IPV6_TC   (AVF_PROT_IPV6_OUTER | AVF_IP_TOS)

Definition at line 155 of file avf_advanced_flow.h.

◆ AVF_INSET_L2TPV3OIP_SESSION_ID

#define AVF_INSET_L2TPV3OIP_SESSION_ID   (AVF_PROT_L2TPV3OIP | AVF_L2TPV3OIP_SESSION_ID)

Definition at line 175 of file avf_advanced_flow.h.

◆ AVF_INSET_NONE

#define AVF_INSET_NONE   0ULL

Definition at line 136 of file avf_advanced_flow.h.

◆ AVF_INSET_PFCP_S_FIELD

#define AVF_INSET_PFCP_S_FIELD   (AVF_PROT_PFCP | AVF_PFCP_S_FIELD)

Definition at line 177 of file avf_advanced_flow.h.

◆ AVF_INSET_PFCP_SEID

#define AVF_INSET_PFCP_SEID   (AVF_PROT_PFCP | AVF_PFCP_S_FIELD | AVF_PFCP_SEID)

Definition at line 178 of file avf_advanced_flow.h.

◆ AVF_INSET_SCTP_DST_PORT

#define AVF_INSET_SCTP_DST_PORT   (AVF_PROT_SCTP_OUTER | AVF_DPORT)

Definition at line 162 of file avf_advanced_flow.h.

◆ AVF_INSET_SCTP_SRC_PORT

#define AVF_INSET_SCTP_SRC_PORT   (AVF_PROT_SCTP_OUTER | AVF_SPORT)

Definition at line 161 of file avf_advanced_flow.h.

◆ AVF_INSET_SMAC

#define AVF_INSET_SMAC   (AVF_PROT_MAC_OUTER | AVF_SMAC)

Definition at line 140 of file avf_advanced_flow.h.

◆ AVF_INSET_TCP_DST_PORT

#define AVF_INSET_TCP_DST_PORT   (AVF_PROT_TCP_OUTER | AVF_DPORT)

Definition at line 158 of file avf_advanced_flow.h.

◆ AVF_INSET_TCP_SRC_PORT

#define AVF_INSET_TCP_SRC_PORT   (AVF_PROT_TCP_OUTER | AVF_SPORT)

Definition at line 157 of file avf_advanced_flow.h.

◆ AVF_INSET_UDP_DST_PORT

#define AVF_INSET_UDP_DST_PORT   (AVF_PROT_UDP_OUTER | AVF_DPORT)

Definition at line 160 of file avf_advanced_flow.h.

◆ AVF_INSET_UDP_SRC_PORT

#define AVF_INSET_UDP_SRC_PORT   (AVF_PROT_UDP_OUTER | AVF_SPORT)

Definition at line 159 of file avf_advanced_flow.h.

◆ AVF_INSET_VLAN_INNER

#define AVF_INSET_VLAN_INNER   (AVF_PROT_VLAN_INNER)

Definition at line 142 of file avf_advanced_flow.h.

◆ AVF_INSET_VLAN_OUTER

#define AVF_INSET_VLAN_OUTER   (AVF_PROT_VLAN_OUTER)

Definition at line 143 of file avf_advanced_flow.h.

◆ AVF_IP_DST

#define AVF_IP_DST   (1ULL << 59)

Definition at line 116 of file avf_advanced_flow.h.

◆ AVF_IP_PROTO

#define AVF_IP_PROTO   (1ULL << 58)

Definition at line 117 of file avf_advanced_flow.h.

◆ AVF_IP_SRC

#define AVF_IP_SRC   (1ULL << 60)

Definition at line 115 of file avf_advanced_flow.h.

◆ AVF_IP_TOS

#define AVF_IP_TOS   (1ULL << 56)

Definition at line 119 of file avf_advanced_flow.h.

◆ AVF_IP_TTL

#define AVF_IP_TTL   (1ULL << 57)

Definition at line 118 of file avf_advanced_flow.h.

◆ AVF_L2TPV3OIP_SESSION_ID

#define AVF_L2TPV3OIP_SESSION_ID   (1ULL << 45)

Definition at line 130 of file avf_advanced_flow.h.

◆ AVF_NVGRE_TNI

#define AVF_NVGRE_TNI   (1ULL << 50)

Definition at line 125 of file avf_advanced_flow.h.

◆ AVF_PFCP_S_FIELD

#define AVF_PFCP_S_FIELD   (1ULL << 44)

Definition at line 131 of file avf_advanced_flow.h.

◆ AVF_PFCP_SEID

#define AVF_PFCP_SEID   (1ULL << 43)

Definition at line 132 of file avf_advanced_flow.h.

◆ AVF_PROT_AH

#define AVF_PROT_AH   (1ULL << 23)

Definition at line 106 of file avf_advanced_flow.h.

◆ AVF_PROT_ESP

#define AVF_PROT_ESP   (1ULL << 22)

Definition at line 105 of file avf_advanced_flow.h.

◆ AVF_PROT_GTPU

#define AVF_PROT_GTPU   (1ULL << 21)

Definition at line 104 of file avf_advanced_flow.h.

◆ AVF_PROT_ICMP4_INNER

#define AVF_PROT_ICMP4_INNER   (1ULL << 15)

Definition at line 98 of file avf_advanced_flow.h.

◆ AVF_PROT_ICMP4_OUTER

#define AVF_PROT_ICMP4_OUTER   (1ULL << 16)

Definition at line 99 of file avf_advanced_flow.h.

◆ AVF_PROT_ICMP6_INNER

#define AVF_PROT_ICMP6_INNER   (1ULL << 17)

Definition at line 100 of file avf_advanced_flow.h.

◆ AVF_PROT_ICMP6_OUTER

#define AVF_PROT_ICMP6_OUTER   (1ULL << 18)

Definition at line 101 of file avf_advanced_flow.h.

◆ AVF_PROT_IPV4_INNER

#define AVF_PROT_IPV4_INNER   (1ULL << 5)

Definition at line 88 of file avf_advanced_flow.h.

◆ AVF_PROT_IPV4_OUTER

#define AVF_PROT_IPV4_OUTER   (1ULL << 6)

Definition at line 89 of file avf_advanced_flow.h.

◆ AVF_PROT_IPV6_INNER

#define AVF_PROT_IPV6_INNER   (1ULL << 7)

Definition at line 90 of file avf_advanced_flow.h.

◆ AVF_PROT_IPV6_OUTER

#define AVF_PROT_IPV6_OUTER   (1ULL << 8)

Definition at line 91 of file avf_advanced_flow.h.

◆ AVF_PROT_L2TPV3OIP

#define AVF_PROT_L2TPV3OIP   (1ULL << 24)

Definition at line 107 of file avf_advanced_flow.h.

◆ AVF_PROT_MAC_INNER

#define AVF_PROT_MAC_INNER   (1ULL << 1)

Definition at line 84 of file avf_advanced_flow.h.

◆ AVF_PROT_MAC_OUTER

#define AVF_PROT_MAC_OUTER   (1ULL << 2)

Definition at line 85 of file avf_advanced_flow.h.

◆ AVF_PROT_NVGRE

#define AVF_PROT_NVGRE   (1ULL << 20)

Definition at line 103 of file avf_advanced_flow.h.

◆ AVF_PROT_PFCP

#define AVF_PROT_PFCP   (1ULL << 25)

Definition at line 108 of file avf_advanced_flow.h.

◆ AVF_PROT_SCTP_INNER

#define AVF_PROT_SCTP_INNER   (1ULL << 13)

Definition at line 96 of file avf_advanced_flow.h.

◆ AVF_PROT_SCTP_OUTER

#define AVF_PROT_SCTP_OUTER   (1ULL << 14)

Definition at line 97 of file avf_advanced_flow.h.

◆ AVF_PROT_TCP_INNER

#define AVF_PROT_TCP_INNER   (1ULL << 9)

Definition at line 92 of file avf_advanced_flow.h.

◆ AVF_PROT_TCP_OUTER

#define AVF_PROT_TCP_OUTER   (1ULL << 10)

Definition at line 93 of file avf_advanced_flow.h.

◆ AVF_PROT_UDP_INNER

#define AVF_PROT_UDP_INNER   (1ULL << 11)

Definition at line 94 of file avf_advanced_flow.h.

◆ AVF_PROT_UDP_OUTER

#define AVF_PROT_UDP_OUTER   (1ULL << 12)

Definition at line 95 of file avf_advanced_flow.h.

◆ AVF_PROT_VLAN_INNER

#define AVF_PROT_VLAN_INNER   (1ULL << 3)

Definition at line 86 of file avf_advanced_flow.h.

◆ AVF_PROT_VLAN_OUTER

#define AVF_PROT_VLAN_OUTER   (1ULL << 4)

Definition at line 87 of file avf_advanced_flow.h.

◆ AVF_PROT_VXLAN

#define AVF_PROT_VXLAN   (1ULL << 19)

Definition at line 102 of file avf_advanced_flow.h.

◆ AVF_SMAC

#define AVF_SMAC   (1ULL << 63)

Definition at line 112 of file avf_advanced_flow.h.

◆ AVF_SPORT

#define AVF_SPORT   (1ULL << 55)

Definition at line 120 of file avf_advanced_flow.h.

◆ AVF_SUCCESS

#define AVF_SUCCESS   (0)

Definition at line 21 of file avf_advanced_flow.h.

◆ AVF_VXLAN_VNI

#define AVF_VXLAN_VNI   (1ULL << 51)

Definition at line 124 of file avf_advanced_flow.h.

◆ BIT

#define BIT (   a)    (1UL << (a))

Definition at line 24 of file avf_advanced_flow.h.

◆ BIT_ULL

#define BIT_ULL (   a)    (1ULL << (a))

Definition at line 25 of file avf_advanced_flow.h.

◆ PROTO_HDR_FIELD_MASK

#define PROTO_HDR_FIELD_MASK   ((1UL << PROTO_HDR_SHIFT) - 1)

Definition at line 51 of file avf_advanced_flow.h.

◆ PROTO_HDR_FIELD_START

#define PROTO_HDR_FIELD_START (   proto_hdr_type)    (proto_hdr_type << PROTO_HDR_SHIFT)

Definition at line 49 of file avf_advanced_flow.h.

◆ PROTO_HDR_SHIFT

#define PROTO_HDR_SHIFT   5

Definition at line 48 of file avf_advanced_flow.h.

◆ VIRTCHNL_ADD_PROTO_HDR_FIELD

#define VIRTCHNL_ADD_PROTO_HDR_FIELD (   hdr,
  field 
)    ((hdr)->field_selector |= BIT ((field) &PROTO_HDR_FIELD_MASK))

Definition at line 60 of file avf_advanced_flow.h.

◆ VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT

#define VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT (   hdr,
  hdr_type,
  field 
)    (VIRTCHNL_ADD_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))

Definition at line 68 of file avf_advanced_flow.h.

◆ VIRTCHNL_CHECK_STRUCT_LEN

#define VIRTCHNL_CHECK_STRUCT_LEN (   n,
 
)
Value:
enum virtchnl_static_assert_enum_##X \
{ \
virtchnl_static_assert_##X = (n) / ((sizeof (struct X) == (n)) ? 1 : 0) \
}

Definition at line 32 of file avf_advanced_flow.h.

◆ VIRTCHNL_CHECK_UNION_LEN

#define VIRTCHNL_CHECK_UNION_LEN (   n,
 
)
Value:
enum virtchnl_static_asset_enum_##X \
{ \
virtchnl_static_assert_##X = (n) / ((sizeof (union X) == (n)) ? 1 : 0) \
}

Definition at line 37 of file avf_advanced_flow.h.

◆ VIRTCHNL_DEL_PROTO_HDR_FIELD

#define VIRTCHNL_DEL_PROTO_HDR_FIELD (   hdr,
  field 
)    ((hdr)->field_selector &= ~BIT ((field) &PROTO_HDR_FIELD_MASK))

Definition at line 62 of file avf_advanced_flow.h.

◆ VIRTCHNL_DEL_PROTO_HDR_FIELD_BIT

#define VIRTCHNL_DEL_PROTO_HDR_FIELD_BIT (   hdr,
  hdr_type,
  field 
)    (VIRTCHNL_DEL_PROTO_HDR_FIELD (hdr, VIRTCHNL_PROTO_HDR_##hdr_type##_##field))

Definition at line 70 of file avf_advanced_flow.h.

◆ VIRTCHNL_GET_PROTO_HDR_FIELD

#define VIRTCHNL_GET_PROTO_HDR_FIELD (   hdr)    ((hdr)->field_selector)

Definition at line 66 of file avf_advanced_flow.h.

◆ VIRTCHNL_GET_PROTO_HDR_TYPE

#define VIRTCHNL_GET_PROTO_HDR_TYPE (   hdr)    (((hdr)->type) >> PROTO_HDR_SHIFT)

Definition at line 75 of file avf_advanced_flow.h.

◆ VIRTCHNL_MAX_NUM_ACTIONS

#define VIRTCHNL_MAX_NUM_ACTIONS   8

Definition at line 398 of file avf_advanced_flow.h.

◆ VIRTCHNL_MAX_NUM_PROTO_HDRS

#define VIRTCHNL_MAX_NUM_PROTO_HDRS   32

Definition at line 47 of file avf_advanced_flow.h.

◆ VIRTCHNL_SET_PROTO_HDR_TYPE

#define VIRTCHNL_SET_PROTO_HDR_TYPE (   hdr,
  hdr_type 
)    ((hdr)->type = VIRTCHNL_PROTO_HDR_##hdr_type)

Definition at line 73 of file avf_advanced_flow.h.

◆ VIRTCHNL_TEST_PROTO_HDR

#define VIRTCHNL_TEST_PROTO_HDR (   hdr,
  val 
)
Value:
VIRTCHNL_TEST_PROTO_HDR_FIELD (hdr, val))

Definition at line 78 of file avf_advanced_flow.h.

◆ VIRTCHNL_TEST_PROTO_HDR_FIELD

#define VIRTCHNL_TEST_PROTO_HDR_FIELD (   hdr,
  val 
)    ((hdr)->field_selector & BIT ((val) &PROTO_HDR_FIELD_MASK))

Definition at line 64 of file avf_advanced_flow.h.

◆ VIRTCHNL_TEST_PROTO_HDR_TYPE

#define VIRTCHNL_TEST_PROTO_HDR_TYPE (   hdr,
  val 
)    ((hdr)->type == ((val) >> PROTO_HDR_SHIFT))

Definition at line 76 of file avf_advanced_flow.h.

Typedef Documentation

◆ avf_fdir_vc_op_t

typedef int(* avf_fdir_vc_op_t) (void *vc_hdl, enum virthnl_adv_ops vc_op, void *in, u32 in_len, void *out, u32 out_len)

Definition at line 790 of file avf_advanced_flow.h.

Enumeration Type Documentation

◆ avf_eth_hash_function

Hash function types.

Enumerator
AVF_ETH_HASH_FUNCTION_DEFAULT 
AVF_ETH_HASH_FUNCTION_TOEPLITZ 

Toeplitz.

AVF_ETH_HASH_FUNCTION_SIMPLE_XOR 

Simple XOR.

AVF_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ 

Symmetric Toeplitz: src, dst will be replaced by xor(src, dst).

For the case with src/dst only, src or dst address will xor with zero pair.

AVF_ETH_HASH_FUNCTION_MAX 

Definition at line 721 of file avf_advanced_flow.h.

◆ avf_flow_error_type

Those headers used temporary, maybe OS packet definition can replace.

Add flow error, pattern and action definition. Verbose error types.

Most of them provide the type of the object referenced by struct rte_flow_error.cause.

Enumerator
AVF_FLOW_ERROR_TYPE_NONE 

No error.

AVF_FLOW_ERROR_TYPE_UNSPECIFIED 

Cause unspecified.

AVF_FLOW_ERROR_TYPE_HANDLE 

Flow rule (handle).

AVF_FLOW_ERROR_TYPE_ATTR_GROUP 

Group field.

AVF_FLOW_ERROR_TYPE_ATTR_PRIORITY 

Priority field.

AVF_FLOW_ERROR_TYPE_ATTR_INGRESS 

Ingress field.

AVF_FLOW_ERROR_TYPE_ATTR_EGRESS 

Egress field.

AVF_FLOW_ERROR_TYPE_ATTR_TRANSFER 

Transfer field.

AVF_FLOW_ERROR_TYPE_ATTR 

Attributes structure.

AVF_FLOW_ERROR_TYPE_ITEM_NUM 

Pattern length.

AVF_FLOW_ERROR_TYPE_ITEM_SPEC 

Item specification.

AVF_FLOW_ERROR_TYPE_ITEM_LAST 

Item specification range.

AVF_FLOW_ERROR_TYPE_ITEM_MASK 

Item specification mask.

AVF_FLOW_ERROR_TYPE_ITEM 

Specific pattern item.

AVF_FLOW_ERROR_TYPE_ACTION_NUM 

Number of actions.

AVF_FLOW_ERROR_TYPE_ACTION_CONF 

Action configuration.

AVF_FLOW_ERROR_TYPE_ACTION 

Specific action.

Definition at line 539 of file avf_advanced_flow.h.

◆ virtchnl_action

Enumerator
VIRTCHNL_ACTION_DROP 
VIRTCHNL_ACTION_TC_REDIRECT 
VIRTCHNL_ACTION_PASSTHRU 
VIRTCHNL_ACTION_QUEUE 
VIRTCHNL_ACTION_Q_REGION 
VIRTCHNL_ACTION_MARK 
VIRTCHNL_ACTION_COUNT 
VIRTCHNL_ACTION_NONE 

Definition at line 358 of file avf_advanced_flow.h.

◆ virtchnl_fdir_prgm_status

Enumerator
VIRTCHNL_FDIR_SUCCESS 
VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE 
VIRTCHNL_FDIR_FAILURE_RULE_EXIST 
VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT 
VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST 
VIRTCHNL_FDIR_FAILURE_RULE_INVALID 
VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT 
VIRTCHNL_FDIR_FAILURE_QUERY_INVALID 
VIRTCHNL_FDIR_FAILURE_MAX 

Definition at line 462 of file avf_advanced_flow.h.

◆ virtchnl_proto_hdr_field

Enumerator
VIRTCHNL_PROTO_HDR_ETH_SRC 
VIRTCHNL_PROTO_HDR_ETH_DST 
VIRTCHNL_PROTO_HDR_ETH_ETHERTYPE 
VIRTCHNL_PROTO_HDR_S_VLAN_ID 
VIRTCHNL_PROTO_HDR_C_VLAN_ID 
VIRTCHNL_PROTO_HDR_IPV4_SRC 
VIRTCHNL_PROTO_HDR_IPV4_DST 
VIRTCHNL_PROTO_HDR_IPV4_DSCP 
VIRTCHNL_PROTO_HDR_IPV4_TTL 
VIRTCHNL_PROTO_HDR_IPV4_PROT 
VIRTCHNL_PROTO_HDR_IPV6_SRC 
VIRTCHNL_PROTO_HDR_IPV6_DST 
VIRTCHNL_PROTO_HDR_IPV6_TC 
VIRTCHNL_PROTO_HDR_IPV6_HOP_LIMIT 
VIRTCHNL_PROTO_HDR_IPV6_PROT 
VIRTCHNL_PROTO_HDR_TCP_SRC_PORT 
VIRTCHNL_PROTO_HDR_TCP_DST_PORT 
VIRTCHNL_PROTO_HDR_UDP_SRC_PORT 
VIRTCHNL_PROTO_HDR_UDP_DST_PORT 
VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT 
VIRTCHNL_PROTO_HDR_SCTP_DST_PORT 
VIRTCHNL_PROTO_HDR_GTPU_IP_TEID 
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU 
VIRTCHNL_PROTO_HDR_GTPU_EH_QFI 
VIRTCHNL_PROTO_HDR_PPPOE_SESS_ID 
VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID 
VIRTCHNL_PROTO_HDR_ESP_SPI 
VIRTCHNL_PROTO_HDR_AH_SPI 
VIRTCHNL_PROTO_HDR_PFCP_S_FIELD 
VIRTCHNL_PROTO_HDR_PFCP_SEID 

Definition at line 208 of file avf_advanced_flow.h.

◆ virtchnl_proto_hdr_type

Enumerator
VIRTCHNL_PROTO_HDR_NONE 
VIRTCHNL_PROTO_HDR_ETH 
VIRTCHNL_PROTO_HDR_S_VLAN 
VIRTCHNL_PROTO_HDR_C_VLAN 
VIRTCHNL_PROTO_HDR_IPV4 
VIRTCHNL_PROTO_HDR_IPV6 
VIRTCHNL_PROTO_HDR_TCP 
VIRTCHNL_PROTO_HDR_UDP 
VIRTCHNL_PROTO_HDR_SCTP 
VIRTCHNL_PROTO_HDR_GTPU_IP 
VIRTCHNL_PROTO_HDR_GTPU_EH 
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN 
VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP 
VIRTCHNL_PROTO_HDR_PPPOE 
VIRTCHNL_PROTO_HDR_L2TPV3 
VIRTCHNL_PROTO_HDR_ESP 
VIRTCHNL_PROTO_HDR_AH 
VIRTCHNL_PROTO_HDR_PFCP 

Definition at line 185 of file avf_advanced_flow.h.

◆ virtchnl_rss_algorithm

Enumerator
VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC 
VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC 
VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC 
VIRTCHNL_RSS_ALG_XOR_SYMMETRIC 

Definition at line 341 of file avf_advanced_flow.h.

◆ virthnl_adv_ops

Enumerator
VIRTCHNL_ADV_OP_ADD_FDIR_FILTER 
VIRTCHNL_ADV_OP_DEL_FDIR_FILTER 
VIRTCHNL_ADV_OP_QUERY_FDIR_FILTER 
VIRTCHNL_ADV_OP_MAX 

Definition at line 781 of file avf_advanced_flow.h.

Function Documentation

◆ avf_fdir_parse_action()

int avf_fdir_parse_action ( const struct avf_flow_action  actions[],
struct avf_fdir_conf rcfg,
struct avf_flow_error error 
)

Definition at line 672 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_parse_action_qregion()

int avf_fdir_parse_action_qregion ( struct avf_fdir_conf rcfg,
const struct avf_flow_action act,
int  act_idx,
struct avf_flow_error error 
)

Set action as to queue group, conflict with drop action.

Parameters
rcfgthe rule cfg object
actflow actions
act_idxaction index @error save error cause
Returns
0 = successful. < 0 = failure.

Definition at line 507 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_parse_pattern()

int avf_fdir_parse_pattern ( struct avf_fdir_conf rcfg,
struct avf_flow_item  avf_items[],
struct avf_flow_error error 
)

Definition at line 789 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_prgm_error_decode()

char* avf_fdir_prgm_error_decode ( int  err_no)

Definition at line 827 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_act_drop()

int avf_fdir_rcfg_act_drop ( struct avf_fdir_conf rcfg,
int  act_idx 
)

Set action as as drop, conflict with to queue(gropu) action.

Parameters
rcfgthe rule cfg object
act_idxaction index
Returns
0 = successful. < 0 = failure.

Definition at line 564 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_act_mark()

int avf_fdir_rcfg_act_mark ( struct avf_fdir_conf rcfg,
const u32  mark,
int  act_idx 
)

Set action as mark, it can co-exist with to queue(group) or drop action.

Parameters
rcfgthe rule cfg object
marka 32 bit flow mark
act_idxaction index
Returns
0 = successful. < 0 = failure.

Definition at line 578 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_act_queue()

int avf_fdir_rcfg_act_queue ( struct avf_fdir_conf rcfg,
int  queue,
int  size,
int  act_idx 
)

Set action as to queue(group), conflict with drop action.

Parameters
rcfgrule cfg object
queuequeue id.
sizequeue group size, must be 2^n. 1 means only to single queue.
act_idxaction index
Returns
0 = successful. < 0 = failure.

Definition at line 486 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_create()

int avf_fdir_rcfg_create ( struct avf_fdir_conf **  rcfg,
int  tunnel_level,
u16  vsi,
u16  nrxq 
)

Create a rule cfg object.

Parameters
rcfgcreated rule cfg object.
tunneltunnel level where protocol header start from 0 from moster outer layer. 1 from first inner layer. 2 form second inner layer. ...
vsiavf vsi id
nrxqthe rx queue number of the avf
Returns
0 = successful. < 0 = failure.

Definition at line 43 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_destroy()

int avf_fdir_rcfg_destroy ( struct avf_fdir_conf rcfg)

Destroy a rule cfg object.

Parameters
rcfgthe cfg object to destroy.
Returns
0 = successful. < 0 = failure.

Definition at line 62 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_set_field()

int avf_fdir_rcfg_set_field ( struct avf_fdir_conf rcfg,
int  layer,
struct avf_flow_item item,
struct avf_flow_error error 
)

Set a match field on specific protocol layer, if any match field already be set on this layer, it will be overwritten.

Parameters
rcfgthe rule cfg object
layerlayer of the protocol header.
itemflow item
errorsave error cause
Returns
0 = successful. < 0 = failure.

Definition at line 85 of file avf_fdir_lib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_fdir_rcfg_set_hdr()

int avf_fdir_rcfg_set_hdr ( struct avf_fdir_conf rcfg,
int  layer,
enum virtchnl_proto_hdr_type  hdr 
)

Set match potocol header on specific layer, it will overwrite is already be set.

Parameters
rcfgthe rule cfg object
layerlayer of the protocol header.
hdrprotocol header type.
Returns
0 = successful. < 0 = failure.

Definition at line 70 of file avf_fdir_lib.c.

◆ avf_fdir_rcfg_validate()

int avf_fdir_rcfg_validate ( struct avf_fdir_vc_ctx ctx,
struct avf_fdir_conf rcfg 
)

Validate a flow rule cfg, check with PF driver if the rule cfg is supportted or not.

Parameters
ctxvirtual channel context
rcfgthe rule cfg object.
Returns
0 = successful. < 0 = failure.

Definition at line 594 of file avf_fdir_lib.c.

◆ avf_fdir_rule_create()

int avf_fdir_rule_create ( struct avf_fdir_vc_ctx ctx,
struct avf_fdir_conf rcfg 
)

Create a flow rule, a FDIR rule is expected to be programmed into hardware if return success.

Parameters
ctxvirtual channel context
rcfgrule cfg object.
Returns
0 = successfule. < 0 = failure.

Definition at line 620 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ avf_fdir_rule_destroy()

int avf_fdir_rule_destroy ( struct avf_fdir_vc_ctx ctx,
struct avf_fdir_conf rcfg 
)

Destroy a flow rule.

Parameters
ctxvirtual channel context
rcfgthe rule cfg object.
Returns
0 = successfule. < 0 = failure.

Definition at line 647 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ avf_flow_error_set()

int avf_flow_error_set ( struct avf_flow_error error,
int  code,
enum avf_flow_error_type  type,
const void *  cause,
const char *  message 
)

Initialize flow error structure.

Parameters
[out]errorPointer to flow error structure (may be NULL).
codeRelated error code
typeCause field and error types.
causeObject responsible for the error.
messageHuman-readable error message.
Returns
Negative error code (errno value)

Definition at line 810 of file avf_fdir_lib.c.

+ Here is the caller graph for this function:

◆ VIRTCHNL_CHECK_STRUCT_LEN() [1/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 12  ,
virtchnl_fdir_del   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [2/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 2312  ,
virtchnl_proto_hdrs   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [3/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 24  ,
virtchnl_fdir_query_info   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [4/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 2444  ,
virtchnl_rss_cfg   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [5/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 2604  ,
virtchnl_fdir_rule   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [6/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 2616  ,
virtchnl_fdir_add   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [7/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 292  ,
virtchnl_filter_action_set   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [8/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 36  ,
virtchnl_filter_action   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [9/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 48  ,
virtchnl_fdir_query   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [10/13]

VIRTCHNL_CHECK_STRUCT_LEN ( ,
virtchnl_rss_key   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [11/13]

VIRTCHNL_CHECK_STRUCT_LEN ( ,
virtchnl_rss_lut   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [12/13]

VIRTCHNL_CHECK_STRUCT_LEN ( 72  ,
virtchnl_proto_hdr   
)

◆ VIRTCHNL_CHECK_STRUCT_LEN() [13/13]

VIRTCHNL_CHECK_STRUCT_LEN ( ,
virtchnl_rss_hena   
)
VIRTCHNL_TEST_PROTO_HDR_TYPE
#define VIRTCHNL_TEST_PROTO_HDR_TYPE(hdr, val)
Definition: avf_advanced_flow.h:76