#include <stdint.h>
#include <rte_common.h>
-#include "rte_ether.h"
+#include <rte_ether.h>
+#include "rte_flow.h"
/**
+ * @deprecated Please use rte_flow API instead of this legacy one.
* @file
*
* Ethernet device features and related data structures used
* by control APIs should be defined in this file.
- *
*/
#ifdef __cplusplus
extern "C" {
#endif
-/*
- * A packet can be identified by hardware as different flow types. Different
- * NIC hardwares may support different flow types.
- * Basically, the NIC hardware identifies the flow type as deep protocol as
- * possible, and exclusively. For example, if a packet is identified as
- * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
- * though it is an actual IPV4 packet.
- * Note that the flow types are used to define RSS offload types in
- * rte_ethdev.h.
- */
-#define RTE_ETH_FLOW_UNKNOWN 0
-#define RTE_ETH_FLOW_RAW 1
-#define RTE_ETH_FLOW_IPV4 2
-#define RTE_ETH_FLOW_FRAG_IPV4 3
-#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4
-#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5
-#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6
-#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7
-#define RTE_ETH_FLOW_IPV6 8
-#define RTE_ETH_FLOW_FRAG_IPV6 9
-#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10
-#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11
-#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12
-#define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13
-#define RTE_ETH_FLOW_L2_PAYLOAD 14
-#define RTE_ETH_FLOW_IPV6_EX 15
-#define RTE_ETH_FLOW_IPV6_TCP_EX 16
-#define RTE_ETH_FLOW_IPV6_UDP_EX 17
-#define RTE_ETH_FLOW_PORT 18
- /**< Consider device port number as a flow differentiator */
-#define RTE_ETH_FLOW_VXLAN 19 /**< VXLAN protocol based flow */
-#define RTE_ETH_FLOW_GENEVE 20 /**< GENEVE protocol based flow */
-#define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */
-#define RTE_ETH_FLOW_VXLAN_GPE 22 /**< VXLAN-GPE protocol based flow */
-#define RTE_ETH_FLOW_MAX 23
-
/**
* Feature filter types
*/
uint8_t is_vf; /**< 1 for VF, 0 for port dev */
uint16_t dst_id; /**< VF ID, available when is_vf is 1*/
enum rte_mac_filter_type filter_type; /**< MAC filter type */
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
};
/**
* RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations.
*/
struct rte_eth_ethertype_filter {
- struct ether_addr mac_addr; /**< Mac address to match. */
+ struct rte_ether_addr mac_addr; /**< Mac address to match. */
uint16_t ether_type; /**< Ether type to match */
uint16_t flags; /**< Flags from RTE_ETHTYPE_FLAGS_* */
uint16_t queue; /**< Queue assigned to when match*/
RTE_NTUPLE_FLAGS_DST_PORT | \
RTE_NTUPLE_FLAGS_PROTO)
-#define TCP_URG_FLAG 0x20
-#define TCP_ACK_FLAG 0x10
-#define TCP_PSH_FLAG 0x08
-#define TCP_RST_FLAG 0x04
-#define TCP_SYN_FLAG 0x02
-#define TCP_FIN_FLAG 0x01
-#define TCP_FLAG_ALL 0x3F
+#define RTE_NTUPLE_TCP_FLAGS_MASK 0x3F /**< TCP flags filter can match. */
/**
* A structure used to define the ntuple filter entry
uint16_t queue; /**< Queue assigned to when match*/
};
-/**
- * Tunneled type.
- */
-enum rte_eth_tunnel_type {
- RTE_TUNNEL_TYPE_NONE = 0,
- RTE_TUNNEL_TYPE_VXLAN,
- RTE_TUNNEL_TYPE_GENEVE,
- RTE_TUNNEL_TYPE_TEREDO,
- RTE_TUNNEL_TYPE_NVGRE,
- RTE_TUNNEL_TYPE_IP_IN_GRE,
- RTE_L2_TUNNEL_TYPE_E_TAG,
- RTE_TUNNEL_TYPE_MAX,
-};
-
/**
* filter type of tunneling packet
*/
* Tunneling Packet filter configuration.
*/
struct rte_eth_tunnel_filter_conf {
- struct ether_addr outer_mac; /**< Outer MAC address to match. */
- struct ether_addr inner_mac; /**< Inner MAC address to match. */
+ struct rte_ether_addr outer_mac; /**< Outer MAC address to match. */
+ struct rte_ether_addr inner_mac; /**< Inner MAC address to match. */
uint16_t inner_vlan; /**< Inner VLAN to match. */
enum rte_tunnel_iptype ip_type; /**< IP address type. */
/** Outer destination IP address to match if ETH_TUNNEL_FILTER_OIP
* A structure used to define the input for MAC VLAN flow
*/
struct rte_eth_mac_vlan_flow {
- struct ether_addr mac_addr; /**< Mac address to match. */
+ struct rte_ether_addr mac_addr; /**< Mac address to match. */
};
/**
enum rte_eth_fdir_tunnel_type tunnel_type; /**< Tunnel type to match. */
/** Tunnel ID to match. TNI, VNI... in big endian. */
uint32_t tunnel_id;
- struct ether_addr mac_addr; /**< Mac address to match. */
+ struct rte_ether_addr mac_addr; /**< Mac address to match. */
};
/**
uint16_t vlan_tci_mask; /**< Bit mask for vlan_tci in big endian */
/** Bit mask for ipv4 flow in big endian. */
struct rte_eth_ipv4_flow ipv4_mask;
- /** Bit maks for ipv6 flow in big endian. */
+ /** Bit mask for ipv6 flow in big endian. */
struct rte_eth_ipv6_flow ipv6_mask;
/** Bit mask for L4 source port in big endian. */
uint16_t src_port_mask;
RTE_ETH_HASH_FILTER_INFO_TYPE_MAX,
};
-/**
- * Hash function types.
- */
-enum rte_eth_hash_function {
- RTE_ETH_HASH_FUNCTION_DEFAULT = 0,
- RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */
- RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */
- RTE_ETH_HASH_FUNCTION_MAX,
-};
-
#define RTE_SYM_HASH_MASK_ARRAY_SIZE \
(RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT)
/**