5 #ifndef _RTE_ETH_CTRL_H_
6 #define _RTE_ETH_CTRL_H_
29 RTE_ETH_FILTER_NONE = 0,
30 RTE_ETH_FILTER_MACVLAN,
31 RTE_ETH_FILTER_ETHERTYPE,
32 RTE_ETH_FILTER_FLEXIBLE,
34 RTE_ETH_FILTER_NTUPLE,
35 RTE_ETH_FILTER_TUNNEL,
38 RTE_ETH_FILTER_L2_TUNNEL,
39 RTE_ETH_FILTER_GENERIC,
85 #define RTE_ETHTYPE_FLAGS_MAC 0x0001
86 #define RTE_ETHTYPE_FLAGS_DROP 0x0002
93 struct rte_eth_ethertype_filter {
100 #define RTE_FLEX_FILTER_MAXLEN 128
101 #define RTE_FLEX_FILTER_MASK_SIZE \
102 (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT)
134 #define RTE_NTUPLE_FLAGS_DST_IP 0x0001
135 #define RTE_NTUPLE_FLAGS_SRC_IP 0x0002
136 #define RTE_NTUPLE_FLAGS_DST_PORT 0x0004
137 #define RTE_NTUPLE_FLAGS_SRC_PORT 0x0008
138 #define RTE_NTUPLE_FLAGS_PROTO 0x0010
139 #define RTE_NTUPLE_FLAGS_TCP_FLAG 0x0020
141 #define RTE_5TUPLE_FLAGS ( \
142 RTE_NTUPLE_FLAGS_DST_IP | \
143 RTE_NTUPLE_FLAGS_SRC_IP | \
144 RTE_NTUPLE_FLAGS_DST_PORT | \
145 RTE_NTUPLE_FLAGS_SRC_PORT | \
146 RTE_NTUPLE_FLAGS_PROTO)
148 #define RTE_2TUPLE_FLAGS ( \
149 RTE_NTUPLE_FLAGS_DST_PORT | \
150 RTE_NTUPLE_FLAGS_PROTO)
152 #define TCP_URG_FLAG 0x20
153 #define TCP_ACK_FLAG 0x10
154 #define TCP_PSH_FLAG 0x08
155 #define TCP_RST_FLAG 0x04
156 #define TCP_SYN_FLAG 0x02
157 #define TCP_FIN_FLAG 0x01
158 #define TCP_FLAG_ALL 0x3F
189 #define ETH_TUNNEL_FILTER_OMAC 0x01
190 #define ETH_TUNNEL_FILTER_OIP 0x02
191 #define ETH_TUNNEL_FILTER_TENID 0x04
192 #define ETH_TUNNEL_FILTER_IMAC 0x08
193 #define ETH_TUNNEL_FILTER_IVLAN 0x10
194 #define ETH_TUNNEL_FILTER_IIP 0x20
196 #define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC | \
197 ETH_TUNNEL_FILTER_IVLAN)
198 #define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID (ETH_TUNNEL_FILTER_IMAC | \
199 ETH_TUNNEL_FILTER_IVLAN | \
200 ETH_TUNNEL_FILTER_TENID)
201 #define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC | \
202 ETH_TUNNEL_FILTER_TENID)
203 #define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC (ETH_TUNNEL_FILTER_OMAC | \
204 ETH_TUNNEL_FILTER_TENID | \
205 ETH_TUNNEL_FILTER_IMAC)
241 RTE_ETH_GLOBAL_CFG_TYPE_UNKNOWN = 0,
242 RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN,
243 RTE_ETH_GLOBAL_CFG_TYPE_MAX,
257 #define RTE_ETH_FDIR_MAX_FLEXLEN 16
258 #define RTE_ETH_INSET_SIZE_MAX 128
263 enum rte_eth_input_set_field {
264 RTE_ETH_INPUT_SET_UNKNOWN = 0,
267 RTE_ETH_INPUT_SET_L2_SRC_MAC = 1,
268 RTE_ETH_INPUT_SET_L2_DST_MAC,
269 RTE_ETH_INPUT_SET_L2_OUTER_VLAN,
270 RTE_ETH_INPUT_SET_L2_INNER_VLAN,
271 RTE_ETH_INPUT_SET_L2_ETHERTYPE,
274 RTE_ETH_INPUT_SET_L3_SRC_IP4 = 129,
275 RTE_ETH_INPUT_SET_L3_DST_IP4,
276 RTE_ETH_INPUT_SET_L3_SRC_IP6,
277 RTE_ETH_INPUT_SET_L3_DST_IP6,
278 RTE_ETH_INPUT_SET_L3_IP4_TOS,
279 RTE_ETH_INPUT_SET_L3_IP4_PROTO,
280 RTE_ETH_INPUT_SET_L3_IP6_TC,
281 RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER,
282 RTE_ETH_INPUT_SET_L3_IP4_TTL,
283 RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS,
286 RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT = 257,
287 RTE_ETH_INPUT_SET_L4_UDP_DST_PORT,
288 RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT,
289 RTE_ETH_INPUT_SET_L4_TCP_DST_PORT,
290 RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT,
291 RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT,
292 RTE_ETH_INPUT_SET_L4_SCTP_VERIFICATION_TAG,
295 RTE_ETH_INPUT_SET_TUNNEL_L2_INNER_DST_MAC = 385,
296 RTE_ETH_INPUT_SET_TUNNEL_L2_INNER_SRC_MAC,
297 RTE_ETH_INPUT_SET_TUNNEL_L2_INNER_VLAN,
298 RTE_ETH_INPUT_SET_TUNNEL_L4_UDP_KEY,
299 RTE_ETH_INPUT_SET_TUNNEL_GRE_KEY,
302 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_1ST_WORD = 641,
303 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_2ND_WORD,
304 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_3RD_WORD,
305 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_4TH_WORD,
306 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_5TH_WORD,
307 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_6TH_WORD,
308 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_7TH_WORD,
309 RTE_ETH_INPUT_SET_FLEX_PAYLOAD_8TH_WORD,
311 RTE_ETH_INPUT_SET_DEFAULT = 65533,
312 RTE_ETH_INPUT_SET_NONE = 65534,
313 RTE_ETH_INPUT_SET_MAX = 65535,
320 RTE_ETH_INPUT_SET_OP_UNKNOWN,
323 RTE_ETH_INPUT_SET_OP_MAX
434 RTE_FDIR_TUNNEL_TYPE_UNKNOWN = 0,
435 RTE_FDIR_TUNNEL_TYPE_NVGRE,
436 RTE_FDIR_TUNNEL_TYPE_VXLAN,
494 RTE_ETH_FDIR_ACCEPT = 0,
496 RTE_ETH_FDIR_PASSTHRU,
562 RTE_ETH_PAYLOAD_UNKNOWN = 0,
567 RTE_ETH_PAYLOAD_MAX = 8,
617 #define UINT64_BIT (CHAR_BIT * sizeof(uint64_t))
618 #define RTE_FLOW_MASK_ARRAY_SIZE \
619 (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT)
678 RTE_ETH_FDIR_FILTER_INFO_TYPE_UNKNOWN = 0,
681 RTE_ETH_FDIR_FILTER_INFO_TYPE_MAX,
708 RTE_ETH_HASH_FILTER_INFO_TYPE_UNKNOWN = 0,
715 RTE_ETH_HASH_FILTER_INFO_TYPE_MAX,
718 #define RTE_SYM_HASH_MASK_ARRAY_SIZE \
719 (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT)