20 #include <rte_compat.h> 47 #define RTE_FLOW_LOG(level, ...) \ 48 rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__) 739 .classification = RTE_BE16(UINT16_MAX),
740 .vid = RTE_BE16(0xfff),
826 .reserved = 0x3fffffff,
827 .offset = 0xffffffff,
873 .hdr.src_addr.addr_bytes =
"\xff\xff\xff\xff\xff\xff",
874 .hdr.ether_type = RTE_BE16(0x0000),
915 .hdr.eth_proto = RTE_BE16(0x0000),
935 .dst_addr = RTE_BE32(0xffffffff),
976 "\xff\xff\xff\xff\xff\xff\xff\xff" 977 "\xff\xff\xff\xff\xff\xff\xff\xff",
979 "\xff\xff\xff\xff\xff\xff\xff\xff" 980 "\xff\xff\xff\xff\xff\xff\xff\xff",
1030 .dst_port = RTE_BE16(0xffff),
1049 .dst_port = RTE_BE16(0xffff),
1068 .dst_port = RTE_BE16(0xffff),
1098 .hdr.
vni =
"\xff\xff\xff",
1151 .
tni =
"\xff\xff\xff",
1164 uint8_t label_tc_s[3];
1275 .
hdr.
teid = RTE_BE32(UINT32_MAX),
1292 .
spi = RTE_BE32(0xffffffff),
1316 .
vni =
"\xff\xff\xff",
1346 .hdr.
vni =
"\xff\xff\xff",
1382 .hdr.arp_data.arp_sip = RTE_BE32(UINT32_MAX),
1383 .hdr.arp_data.arp_tha.addr_bytes =
"\xff\xff\xff\xff\xff\xff",
1384 .hdr.arp_data.arp_tip = RTE_BE32(UINT32_MAX),
1421 struct rte_ipv6_fragment_ext hdr;
1463 uint8_t target_addr[16];
1471 "\xff\xff\xff\xff\xff\xff\xff\xff" 1472 "\xff\xff\xff\xff\xff\xff\xff\xff",
1490 uint8_t target_addr[16];
1498 "\xff\xff\xff\xff\xff\xff\xff\xff" 1499 "\xff\xff\xff\xff\xff\xff\xff\xff",
1736 uint32_t reserved1:4;
1738 uint32_t next_proto:8;
1763 uint32_t max_resp_time:8;
1764 uint32_t checksum:16;
1765 uint32_t group_addr;
1771 .group_addr = 0xffffffff,
1784 uint32_t next_hdr:8;
1785 uint32_t payload_len:8;
1817 .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)),
1851 uint8_t option_type;
1860 .option_type = 0xff,
1905 rte_flow_item_integrity_mask = {
1914 #define RTE_FLOW_CONNTRACK_PKT_STATE_VALID RTE_BIT32(0) 1918 #define RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED RTE_BIT32(1) 1923 #define RTE_FLOW_CONNTRACK_PKT_STATE_INVALID RTE_BIT32(2) 1928 #define RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED RTE_BIT32(3) 1933 #define RTE_FLOW_CONNTRACK_PKT_STATE_BAD RTE_BIT32(4) 1952 .flags = 0xffffffff,
2018 .proto_id = RTE_BE16(0xffff),
2037 .dst_qp =
"\xff\xff\xff",
3198 RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
3207 RTE_ETH_HASH_FUNCTION_MAX,
3535 uint8_t ipv6_addr[16];
3670 struct rte_flow_action_handle;
3962 struct rte_flow_item_flex_handle *flex_handle;
4025 struct rte_flow_meter_policy *policy;
4068 extern int32_t rte_flow_dynf_metadata_offs;
4071 extern uint64_t rte_flow_dynf_metadata_mask;
4074 #define RTE_FLOW_DYNF_METADATA(m) \ 4075 RTE_MBUF_DYNFIELD((m), rte_flow_dynf_metadata_offs, uint32_t *) 4078 #define RTE_MBUF_DYNFLAG_RX_METADATA (rte_flow_dynf_metadata_mask) 4079 #define RTE_MBUF_DYNFLAG_TX_METADATA (rte_flow_dynf_metadata_mask) 4082 static inline uint32_t
4083 rte_flow_dynf_metadata_get(
struct rte_mbuf *m)
4085 return *RTE_FLOW_DYNF_METADATA(m);
4090 rte_flow_dynf_metadata_set(
struct rte_mbuf *m, uint32_t v)
4092 *RTE_FLOW_DYNF_METADATA(m) = v;
4120 struct rte_flow_meter_profile;
4127 struct rte_flow_meter_policy;
4398 return !!rte_flow_dynf_metadata_mask;
4523 struct rte_flow *flow,
4545 struct rte_flow *flow,
4595 struct rte_flow *flow,
4670 const char *message);
4891 struct rte_flow_action_handle *
4922 struct rte_flow_action_handle *handle,
4961 struct rte_flow_action_handle *handle,
4993 const struct rte_flow_action_handle *handle,
4997 struct rte_flow_tunnel {
5034 #define RTE_FLOW_RESTORE_INFO_TUNNEL RTE_BIT64(0) 5039 #define RTE_FLOW_RESTORE_INFO_ENCAPSULATED RTE_BIT64(1) 5044 #define RTE_FLOW_RESTORE_INFO_GROUP_ID RTE_BIT64(2) 5058 struct rte_flow_tunnel tunnel;
5087 struct rte_flow_tunnel *tunnel,
5089 uint32_t *num_of_actions,
5118 struct rte_flow_tunnel *tunnel,
5120 uint32_t *num_of_items,
5186 uint32_t num_of_actions,
5209 uint32_t num_of_items,
5260 struct rte_flow_item_flex_handle *
5282 const struct rte_flow_item_flex_handle *handle,
5289 #define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0) 5381 #define RTE_FLOW_PORT_FLAG_SHARE_INDIRECT RTE_BIT32(0) 5483 struct rte_flow_pattern_template;
5541 struct rte_flow_pattern_template *
5570 struct rte_flow_pattern_template *pattern_template,
5577 struct rte_flow_actions_template;
5635 struct rte_flow_actions_template *
5665 struct rte_flow_actions_template *actions_template,
5672 struct rte_flow_template_table;
5687 #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG RTE_BIT32(0) 5695 #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG RTE_BIT32(1) 5807 struct rte_flow_template_table *
5810 struct rte_flow_pattern_template *pattern_templates[],
5811 uint8_t nb_pattern_templates,
5812 struct rte_flow_actions_template *actions_templates[],
5813 uint8_t nb_actions_templates,
5839 struct rte_flow_template_table *template_table,
5898 struct rte_flow_template_table *template_table,
5900 uint8_t pattern_template_index,
5902 uint8_t actions_template_index,
5943 struct rte_flow_template_table *template_table,
5944 uint32_t rule_index,
5946 uint8_t actions_template_index,
5984 struct rte_flow *flow,
6021 struct rte_flow *flow,
6023 uint8_t actions_template_index,
6148 struct rte_flow_action_handle *
6187 struct rte_flow_action_handle *action_handle,
6226 struct rte_flow_action_handle *action_handle,
6270 const struct rte_flow_action_handle *action_handle,
6325 struct rte_flow_action_handle *handle,
6326 const void *update,
void *query,
6369 struct rte_flow_action_handle *handle,
6370 const void *update,
void *query,
6375 struct rte_flow_action_list_handle;
6427 struct rte_flow_action_list_handle *
6469 struct rte_flow_action_list_handle *
6501 struct rte_flow_action_list_handle *handle,
6537 (uint16_t port_id, uint32_t queue_id,
6539 struct rte_flow_action_list_handle *handle,
6581 const struct rte_flow_action_list_handle *handle,
6582 const void **update,
void **query,
6633 const struct rte_flow_action_list_handle *handle,
6634 const void **update,
void **query,
static const struct rte_flow_item_icmp6_nd_opt_sla_eth rte_flow_item_icmp6_nd_opt_sla_eth_mask
rte_be16_t ver_opt_len_o_c_rsvd0
__rte_experimental int rte_flow_action_handle_update(uint16_t port_id, struct rte_flow_action_handle *handle, const void *update, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_handle_query(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_action_handle *action_handle, void *data, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_quota rte_flow_item_quota_mask
int rte_flow_validate(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
uint32_t max_nb_aging_objects
struct rte_ether_addr src_addr
struct rte_flow_action * actions
static const struct rte_flow_item_icmp6_nd_na rte_flow_item_icmp6_nd_na_mask
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask
rte_be16_t epcp_edei_in_ecid_b
__rte_experimental int rte_flow_action_handle_query(uint16_t port_id, const struct rte_flow_action_handle *handle, void *data, struct rte_flow_error *error)
__rte_experimental struct rte_flow * rte_flow_async_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_template_table *template_table, const struct rte_flow_item pattern[], uint8_t pattern_template_index, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
struct rte_flow_action_list_handle * handle
static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask
__rte_experimental struct rte_flow_action_list_handle * rte_flow_async_action_list_handle_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *actions, void *user_data, struct rte_flow_error *error)
struct rte_ether_addr arp_sha
__rte_experimental int rte_flow_async_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow *flow, void *user_data, struct rte_flow_error *error)
struct rte_flow_attr * attr
uint32_t color_mode_valid
uint32_t sec_since_last_hit
__rte_experimental int rte_flow_action_handle_destroy(uint16_t port_id, struct rte_flow_action_handle *handle, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_list_handle_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_list_handle *handle, void *user_data, struct rte_flow_error *error)
rte_flow_item_flex_tunnel_mode
int rte_flow_query(uint16_t port_id, struct rte_flow *flow, const struct rte_flow_action *action, void *data, struct rte_flow_error *error)
struct rte_flow_item_flex_link * input_link
__rte_experimental int rte_flow_async_action_handle_destroy(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_handle *action_handle, void *user_data, struct rte_flow_error *error)
uint32_t nb_aging_objects
struct rte_flow_item * definition
static const struct rte_flow_item_gre rte_flow_item_gre_mask
struct rte_flow_meter_profile * profile
__rte_experimental int rte_flow_template_table_destroy(uint16_t port_id, struct rte_flow_template_table *template_table, struct rte_flow_error *error)
struct rte_ether_addr dst_addr
uint32_t relaxed_matching
static const struct rte_flow_item_gtp rte_flow_item_gtp_mask
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask
#define RTE_ETHER_ADDR_LEN
uint8_t retransmission_limit
static const struct rte_flow_item_geneve rte_flow_item_geneve_mask
const struct rte_flow_attr * attr_ro
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask
int rte_flow_isolate(uint16_t port_id, int set, struct rte_flow_error *error)
static const struct rte_flow_item_any rte_flow_item_any_mask
__rte_experimental int rte_flow_action_handle_query_update(uint16_t port_id, struct rte_flow_action_handle *handle, const void *update, void *query, enum rte_flow_query_update_mode mode, struct rte_flow_error *error)
static const struct rte_flow_item_meta rte_flow_item_meta_mask
static const struct rte_flow_item_esp rte_flow_item_esp_mask
__rte_experimental int rte_flow_get_restore_info(uint16_t port_id, struct rte_mbuf *m, struct rte_flow_restore_info *info, struct rte_flow_error *error)
__rte_deprecated size_t rte_flow_copy(struct rte_flow_desc *fd, size_t len, const struct rte_flow_attr *attr, const struct rte_flow_item *items, const struct rte_flow_action *actions)
struct rte_ether_addr tla
rte_flow_item_flex_field_mode
static const struct rte_flow_item_meter_color rte_flow_item_meter_color_mask
static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask
static const struct rte_flow_item_geneve_opt rte_flow_item_geneve_opt_mask
static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask
struct rte_flow_action * actions
uint32_t max_nb_conn_tracks
static const struct rte_flow_item_mark rte_flow_item_mark_mask
struct rte_flow_item_flex_field * sample_data
static const struct rte_flow_item_ib_bth rte_flow_item_ib_bth_mask
static const struct rte_flow_item_icmp6_nd_opt rte_flow_item_icmp6_nd_opt_mask
__rte_experimental int rte_flow_actions_update(uint16_t port_id, struct rte_flow *flow, const struct rte_flow_action actions[], struct rte_flow_error *error)
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask
static const struct rte_flow_item_port_id rte_flow_item_port_id_mask
struct rte_ether_addr dst_addr
static const struct rte_flow_item_higig2_hdr rte_flow_item_higig2_hdr_mask
static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask
struct rte_flow_item * pattern
static const struct rte_flow_item_aggr_affinity rte_flow_item_aggr_affinity_mask
__rte_experimental struct rte_flow * rte_flow_async_create_by_index(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_template_table *template_table, uint32_t rule_index, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_handle_query_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, struct rte_flow_action_handle *handle, const void *update, void *query, enum rte_flow_query_update_mode mode, void *user_data, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_handle_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow_action_handle *action_handle, const void *update, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask
struct rte_l2tpv2_common_hdr common
static const struct rte_flow_item_udp rte_flow_item_udp_mask
__rte_experimental int rte_flow_get_q_aged_flows(uint16_t port_id, uint32_t queue_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
__rte_experimental uint64_t rte_flow_restore_info_dynflag(void)
__rte_experimental int rte_flow_dev_dump(uint16_t port_id, struct rte_flow *flow, FILE *file, struct rte_flow_error *error)
__rte_experimental int rte_flow_actions_template_destroy(uint16_t port_id, struct rte_flow_actions_template *actions_template, struct rte_flow_error *error)
rte_be16_t rsvd_grp_ecid_b
static const struct rte_flow_item_raw rte_flow_item_raw_mask
rte_flow_conntrack_tcp_last_index
__rte_experimental struct rte_flow_item_flex_handle * rte_flow_flex_item_create(uint16_t port_id, const struct rte_flow_item_flex_conf *conf, struct rte_flow_error *error)
struct rte_gtp_psc_generic_hdr hdr
int rte_flow_flush(uint16_t port_id, struct rte_flow_error *error)
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask
static const struct rte_flow_item_icmp6_nd_ns rte_flow_item_icmp6_nd_ns_mask
__rte_experimental struct rte_flow_action_handle * rte_flow_action_handle_create(uint16_t port_id, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *action, struct rte_flow_error *error)
int rte_flow_error_set(struct rte_flow_error *error, int code, enum rte_flow_error_type type, const void *cause, const char *message)
__rte_experimental struct rte_flow_action_list_handle * rte_flow_action_list_handle_create(uint16_t port_id, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *actions, struct rte_flow_error *error)
static const struct rte_flow_item_icmp6_nd_opt_tla_eth rte_flow_item_icmp6_nd_opt_tla_eth_mask
uint32_t init_color_valid
int rte_flow_destroy(uint16_t port_id, struct rte_flow *flow, struct rte_flow_error *error)
__rte_experimental struct rte_flow_action_handle * rte_flow_async_action_handle_create(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, const struct rte_flow_indir_action_conf *indir_action_conf, const struct rte_flow_action *action, void *user_data, struct rte_flow_error *error)
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask
rte_be16_t c_k_s_rsvd0_ver
static const struct rte_flow_item_ppp rte_flow_item_ppp_mask
static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask
const struct rte_flow_action * actions_ro
struct rte_flow_item * items
__rte_experimental int rte_flow_get_aged_flows(uint16_t port_id, void **contexts, uint32_t nb_contexts, struct rte_flow_error *error)
struct rte_ether_addr sla
rte_flow_query_update_mode
struct rte_flow_item_flex_link * output_link
__rte_experimental struct rte_flow_template_table * rte_flow_template_table_create(uint16_t port_id, const struct rte_flow_template_table_attr *table_attr, struct rte_flow_pattern_template *pattern_templates[], uint8_t nb_pattern_templates, struct rte_flow_actions_template *actions_templates[], uint8_t nb_actions_templates, struct rte_flow_error *error)
struct rte_flow * rte_flow_create(uint16_t port_id, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error)
rte_flow_table_insertion_type
__rte_experimental int rte_flow_pattern_template_destroy(uint16_t port_id, struct rte_flow_pattern_template *pattern_template, struct rte_flow_error *error)
static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask
static const struct rte_flow_item_igmp rte_flow_item_igmp_mask
static const struct rte_flow_item_tx_queue rte_flow_item_tx_queue_mask
__rte_experimental int rte_flow_action_list_handle_query_update(uint16_t port_id, const struct rte_flow_action_list_handle *handle, const void **update, void **query, enum rte_flow_query_update_mode mode, struct rte_flow_error *error)
__rte_experimental int rte_flow_tunnel_decap_set(uint16_t port_id, struct rte_flow_tunnel *tunnel, struct rte_flow_action **actions, uint32_t *num_of_actions, struct rte_flow_error *error)
static const struct rte_flow_item_arp_eth_ipv4 rte_flow_item_arp_eth_ipv4_mask
const struct rte_flow_action * actions
__rte_experimental int rte_flow_flex_item_release(uint16_t port_id, const struct rte_flow_item_flex_handle *handle, struct rte_flow_error *error)
uint32_t sec_since_last_hit_valid
static const struct rte_flow_item_eth rte_flow_item_eth_mask
uint32_t challenge_ack_passed
static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask
__rte_experimental int rte_flow_info_get(uint16_t port_id, struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info, struct rte_flow_error *error)
__rte_experimental int rte_flow_conv(enum rte_flow_conv_op op, void *dst, size_t size, const void *src, struct rte_flow_error *error)
__rte_experimental int rte_flow_dynf_metadata_register(void)
static const struct rte_flow_item_ah rte_flow_item_ah_mask
static const struct rte_flow_item_tag rte_flow_item_tag_mask
static const struct rte_flow_item_ipv6_ext rte_flow_item_ipv6_ext_mask
static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask
__rte_experimental struct rte_flow_actions_template * rte_flow_actions_template_create(uint16_t port_id, const struct rte_flow_actions_template_attr *template_attr, const struct rte_flow_action actions[], const struct rte_flow_action masks[], struct rte_flow_error *error)
static const struct rte_flow_item_pppoe_proto_id rte_flow_item_pppoe_proto_id_mask
struct rte_flow_item * definition
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask
static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask
static __rte_experimental int rte_flow_dynf_metadata_avail(void)
__rte_experimental int rte_flow_tunnel_item_release(uint16_t port_id, struct rte_flow_item *items, uint32_t num_of_items, struct rte_flow_error *error)
__rte_experimental struct rte_flow_pattern_template * rte_flow_pattern_template_create(uint16_t port_id, const struct rte_flow_pattern_template_attr *template_attr, const struct rte_flow_item pattern[], struct rte_flow_error *error)
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask
static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]
__rte_experimental int rte_flow_tunnel_action_decap_release(uint16_t port_id, struct rte_flow_action *actions, uint32_t num_of_actions, struct rte_flow_error *error)
__rte_experimental int rte_flow_action_list_handle_destroy(uint16_t port_id, struct rte_flow_action_list_handle *handle, struct rte_flow_error *error)
__rte_experimental int rte_flow_configure(uint16_t port_id, const struct rte_flow_port_attr *port_attr, uint16_t nb_queue, const struct rte_flow_queue_attr *queue_attr[], struct rte_flow_error *error)
__rte_experimental int rte_flow_pull(uint16_t port_id, uint32_t queue_id, struct rte_flow_op_result res[], uint16_t n_res, struct rte_flow_error *error)
__rte_experimental int rte_flow_async_action_list_handle_query_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *attr, const struct rte_flow_action_list_handle *handle, const void **update, void **query, enum rte_flow_query_update_mode mode, void *user_data, struct rte_flow_error *error)
__rte_experimental int rte_flow_tunnel_match(uint16_t port_id, struct rte_flow_tunnel *tunnel, struct rte_flow_item **items, uint32_t *num_of_items, struct rte_flow_error *error)
struct rte_flow_item_flex_handle * handle
const struct rte_flow_item * pattern_ro
static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask
static const struct rte_flow_item_nsh rte_flow_item_nsh_mask
__rte_experimental int rte_flow_async_actions_update(uint16_t port_id, uint32_t queue_id, const struct rte_flow_op_attr *op_attr, struct rte_flow *flow, const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
__rte_experimental int rte_flow_push(uint16_t port_id, uint32_t queue_id, struct rte_flow_error *error)
int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error)