From 8e32fc273a5c1ba1d68a08c2d013b8e24aea836a Mon Sep 17 00:00:00 2001 From: Jingjing Wu Date: Wed, 23 Mar 2016 21:07:04 +0800 Subject: [PATCH] ethdev: add fields to flow director input This patch adds RTE_ETH_INPUT_SET_L3_IP4_TTL, RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field types and extends struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering by tos, protocol and ttl. Signed-off-by: Jingjing Wu Acked-by: Helin Zhang Acked-by: Thomas Monjalon --- doc/guides/rel_notes/deprecation.rst | 8 -------- doc/guides/rel_notes/release_16_04.rst | 3 +++ lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 252a096e6a..bdbac15baf 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -22,14 +22,6 @@ Deprecation Notices * The ethdev structures rte_eth_link, rte_eth_dev_info and rte_eth_conf must be updated to support 100G link and to have a cleaner link speed API. -* ABI changes are planned for struct rte_eth_fdir_flow in order to support - extend flow director's input set. The release 2.2 does not contain these ABI - changes, but release 2.3 will, and no backwards compatibility is planned. - -* ABI changes are planned for rte_eth_ipv4_flow and rte_eth_ipv6_flow to - include more fields to be matched against. The release 2.2 does not - contain these ABI changes, but release 2.3 will. - * ABI changes are planned for adding four new flow types. This impacts RTE_ETH_FLOW_MAX. The release 2.2 does not contain these ABI changes, but release 2.3 will. diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst index 8c355ec62a..7fc32ebe22 100644 --- a/doc/guides/rel_notes/release_16_04.rst +++ b/doc/guides/rel_notes/release_16_04.rst @@ -476,6 +476,9 @@ ABI Changes * The RETA entry size in ``rte_eth_rss_reta_entry64`` has been increased from 8-bit to 16-bit. +* The ethdev flow director structure ``rte_eth_fdir_flow`` structure was + changed. New fields were added to extend flow director's input set. + * The cmdline buffer size has been increase from 256 to 512. diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 6e2f617ef9..aabd7249d6 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -343,6 +343,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, @@ -410,6 +412,9 @@ struct rte_eth_l2_flow { struct rte_eth_ipv4_flow { uint32_t src_ip; /**< IPv4 source address to match. */ uint32_t dst_ip; /**< IPv4 destination address to match. */ + uint8_t tos; /**< Type of service to match. */ + uint8_t ttl; /**< Time to live to match. */ + uint8_t proto; /**< Protocol, next header to match. */ }; /** @@ -446,6 +451,9 @@ struct rte_eth_sctpv4_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. */ + uint8_t tc; /**< Traffic class to match. */ + uint8_t proto; /**< Protocol, next header to match. */ + uint8_t hop_limits; /**< Hop limits to match. */ }; /** -- 2.20.1