X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ether%2Frte_eth_ctrl.h;h=498fc85c5f3ac002bb87857670f634d1bcf867a5;hb=f161fb6ad5125e8286ea6aaa01e8903dacf21161;hp=14a739bd614cf359f8e6b5842f4db141bb54b0ce;hpb=de8f4d57043022e2adb4014ddc49b94aed766bb1;p=dpdk.git diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 14a739bd61..498fc85c5f 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -46,13 +46,49 @@ 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_MAX 18 + /** * Feature filter types */ enum rte_filter_type { RTE_ETH_FILTER_NONE = 0, RTE_ETH_FILTER_MACVLAN, + RTE_ETH_FILTER_ETHERTYPE, + RTE_ETH_FILTER_FLEXIBLE, + RTE_ETH_FILTER_SYN, + RTE_ETH_FILTER_NTUPLE, RTE_ETH_FILTER_TUNNEL, + RTE_ETH_FILTER_FDIR, + RTE_ETH_FILTER_HASH, RTE_ETH_FILTER_MAX }; @@ -60,29 +96,28 @@ enum rte_filter_type { * Generic operations on filters */ enum rte_filter_op { + /** used to check whether the type filter is supported */ RTE_ETH_FILTER_NOP = 0, - /**< used to check whether the type filter is supported */ RTE_ETH_FILTER_ADD, /**< add filter entry */ RTE_ETH_FILTER_UPDATE, /**< update filter entry */ RTE_ETH_FILTER_DELETE, /**< delete filter entry */ RTE_ETH_FILTER_FLUSH, /**< flush all entries */ RTE_ETH_FILTER_GET, /**< get filter entry */ RTE_ETH_FILTER_SET, /**< configurations */ - RTE_ETH_FILTER_INFO, - /**< get information of filter, such as status or statistics */ + RTE_ETH_FILTER_INFO, /**< retrieve information */ + RTE_ETH_FILTER_STATS, /**< retrieve statistics */ RTE_ETH_FILTER_OP_MAX }; -/** +/* * MAC filter type */ enum rte_mac_filter_type { RTE_MAC_PERFECT_MATCH = 1, /**< exact match of MAC addr. */ - RTE_MACVLAN_PERFECT_MATCH, - /**< exact match of MAC addr and VLAN ID. */ + RTE_MACVLAN_PERFECT_MATCH, /**< exact match of MAC addr and VLAN ID. */ RTE_MAC_HASH_MATCH, /**< hash match of MAC addr. */ + /** hash match of MAC addr and exact match of VLAN ID. */ RTE_MACVLAN_HASH_MATCH, - /**< hash match of MAC addr and exact match of VLAN ID. */ }; /** @@ -90,11 +125,116 @@ enum rte_mac_filter_type { */ struct rte_eth_mac_filter { uint8_t is_vf; /**< 1 for VF, 0 for port dev */ - uint16_t dst_id; /**