X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ether%2Frte_eth_ctrl.h;h=c3a2c9e4295c8be56bb8a3ff722ac126cf144809;hb=d8a1ccdc554635485b5db5358e13141f1e3b06d9;hp=255435a275ff0983cea2dcf35ff9dd1ca62dd36e;hpb=dd76f93c2d37f0bcab123b86a11ff6a834c15b8d;p=dpdk.git diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 255435a275..c3a2c9e429 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -74,7 +74,12 @@ extern "C" { #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_MAX 18 +#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_MAX 22 /** * Feature filter types @@ -245,6 +250,7 @@ enum rte_eth_tunnel_type { 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, }; @@ -282,19 +288,22 @@ enum rte_tunnel_iptype { * Tunneling Packet filter configuration. */ struct rte_eth_tunnel_filter_conf { - struct ether_addr outer_mac; /**< Outer MAC address filter. */ - struct ether_addr inner_mac; /**< Inner MAC address filter. */ - uint16_t inner_vlan; /**< Inner VLAN filter. */ + struct ether_addr outer_mac; /**< Outer MAC address to match. */ + struct 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 + is set in filter_type, or inner destination IP address to match + if ETH_TUNNEL_FILTER_IIP is set in filter_type . */ union { - uint32_t ipv4_addr; /**< IPv4 source address to match. */ - uint32_t ipv6_addr[4]; /**< IPv6 source address to match. */ - } ip_addr; /**< IPv4/IPv6 source address to match (union of above). */ - - uint16_t filter_type; /**< Filter type. */ + uint32_t ipv4_addr; /**< IPv4 address in big endian. */ + uint32_t ipv6_addr[4]; /**< IPv6 address in big endian. */ + } ip_addr; + /** Flags from ETH_TUNNEL_FILTER_XX - see above. */ + uint16_t filter_type; enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */ - uint32_t tenant_id; /**< Tenant number. */ - uint16_t queue_id; /**< Queue number. */ + uint32_t tenant_id; /**< Tenant ID to match. VNI, GRE key... */ + uint16_t queue_id; /**< Queue assigned to if match. */ }; /** @@ -342,6 +351,8 @@ enum rte_eth_input_set_field { RTE_ETH_INPUT_SET_L3_IP4_PROTO, RTE_ETH_INPUT_SET_L3_IP6_TC, RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER, + RTE_ETH_INPUT_SET_L3_IP4_TTL, + RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS, /* L4 */ RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT = 257, @@ -400,15 +411,18 @@ struct rte_eth_input_set_conf { * A structure used to define the input for L2 flow */ struct rte_eth_l2_flow { - uint16_t ether_type; /**< Ether type to match */ + uint16_t ether_type; /**< Ether type in big endian */ }; /** * A structure used to define the input for IPV4 flow */ struct rte_eth_ipv4_flow { - uint32_t src_ip; /**< IPv4 source address to match. */ - uint32_t dst_ip; /**< IPv4 destination address to match. */ + uint32_t src_ip; /**< IPv4 source address in big endian. */ + uint32_t dst_ip; /**< IPv4 destination address in big endian. */ + uint8_t tos; /**< Type of service to match. */ + uint8_t ttl; /**< Time to live to match. */ + uint8_t proto; /**< Protocol, next header in big endian. */ }; /** @@ -416,8 +430,8 @@ struct rte_eth_ipv4_flow { */ struct rte_eth_udpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< UDP source port to match. */ - uint16_t dst_port; /**< UDP destination port to match. */ + uint16_t src_port; /**< UDP source port in big endian. */ + uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** @@ -425,8 +439,8 @@ struct rte_eth_udpv4_flow { */ struct rte_eth_tcpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< TCP source port to match. */ - uint16_t dst_port; /**< TCP destination port to match. */ + uint16_t src_port; /**< TCP source port in big endian. */ + uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** @@ -434,17 +448,20 @@ struct rte_eth_tcpv4_flow { */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ - uint16_t src_port; /**< SCTP source port to match. */ - uint16_t dst_port; /**< SCTP destination port to match. */ - uint32_t verify_tag; /**< Verify tag to match */ + uint16_t src_port; /**< SCTP source port in big endian. */ + uint16_t dst_port; /**< SCTP destination port in big endian. */ + uint32_t verify_tag; /**< Verify tag in big endian */ }; /** * A structure used to define the input for IPV6 flow */ struct rte_eth_ipv6_flow { - uint32_t src_ip[4]; /**< IPv6 source address to match. */ - uint32_t dst_ip[4]; /**< IPv6 destination address to match. */ + uint32_t src_ip[4]; /**< IPv6 source address in big endian. */ + uint32_t dst_ip[4]; /**< IPv6 destination address in big endian. */ + uint8_t tc; /**< Traffic class to match. */ + uint8_t proto; /**< Protocol, next header to match. */ + uint8_t hop_limits; /**< Hop limits to match. */ }; /** @@ -452,8 +469,8 @@ struct rte_eth_ipv6_flow { */ struct rte_eth_udpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< UDP source port to match. */ - uint16_t dst_port; /**< UDP destination port to match. */ + uint16_t src_port; /**< UDP source port in big endian. */ + uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** @@ -461,8 +478,8 @@ struct rte_eth_udpv6_flow { */ struct rte_eth_tcpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< TCP source port to match. */ - uint16_t dst_port; /**< TCP destination port to match. */ + uint16_t src_port; /**< TCP source port to in big endian. */ + uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** @@ -470,9 +487,9 @@ struct rte_eth_tcpv6_flow { */ struct rte_eth_sctpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ - uint16_t src_port; /**< SCTP source port to match. */ - uint16_t dst_port; /**< SCTP destination port to match. */ - uint32_t verify_tag; /**< Verify tag to match */ + uint16_t src_port; /**< SCTP source port in big endian. */ + uint16_t dst_port; /**< SCTP destination port in big endian. */ + uint32_t verify_tag; /**< Verify tag in big endian. */ }; /** @@ -497,7 +514,8 @@ enum rte_eth_fdir_tunnel_type { */ struct rte_eth_tunnel_flow { enum rte_eth_fdir_tunnel_type tunnel_type; /**< Tunnel type to match. */ - uint32_t tunnel_id; /**< Tunnel ID to match. TNI, VNI... */ + /** Tunnel ID to match. TNI, VNI... in big endian. */ + uint32_t tunnel_id; struct ether_addr mac_addr; /**< Mac address to match. */ };