From patchwork Wed Mar 23 13:07:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingjing Wu X-Patchwork-Id: 11678 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 2BB072C40; Wed, 23 Mar 2016 14:07:55 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 163FC2C00 for ; Wed, 23 Mar 2016 14:07:47 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 23 Mar 2016 06:07:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,382,1455004800"; d="scan'208";a="943395583" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 23 Mar 2016 06:07:23 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u2ND7Je9017425; Wed, 23 Mar 2016 21:07:19 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2ND7Gl3003529; Wed, 23 Mar 2016 21:07:18 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u2ND7GBE003525; Wed, 23 Mar 2016 21:07:16 +0800 From: Jingjing Wu To: bruce.richardson@intel.com Cc: dev@dpdk.org, jingjing.wu@intel.com, helin.zhang@intel.com Date: Wed, 23 Mar 2016 21:07:04 +0800 Message-Id: <1458738432-3184-2-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1458738432-3184-1-git-send-email-jingjing.wu@intel.com> References: <1458541132-11953-1-git-send-email-jingjing.wu@intel.com> <1458738432-3184-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v6 1/9] ethdev: extend flow director for input selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 252a096..bdbac15 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 9922bcb..6e368f7 100644 --- a/doc/guides/rel_notes/release_16_04.rst +++ b/doc/guides/rel_notes/release_16_04.rst @@ -437,6 +437,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 6e2f617..aabd724 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. */ }; /**