From patchwork Tue Jan 26 06:20:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingjing Wu X-Patchwork-Id: 10070 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 BD25591DC; Tue, 26 Jan 2016 07:20:37 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1B2E091D0 for ; Tue, 26 Jan 2016 07:20:35 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 25 Jan 2016 22:20:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,348,1449561600"; d="scan'208";a="868718546" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 25 Jan 2016 22:20:34 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u0Q6KVlG021118; Tue, 26 Jan 2016 14:20:31 +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 u0Q6KRnh005757; Tue, 26 Jan 2016 14:20:29 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0Q6KRaM005753; Tue, 26 Jan 2016 14:20:27 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Tue, 26 Jan 2016 14:20:13 +0800 Message-Id: <1453789224-5716-2-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1453789224-5716-1-git-send-email-jingjing.wu@intel.com> References: <1453789224-5716-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH 01/12] ethdev: extend flow director to support input set 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 added RTE_ETH_INPUT_SET_L3_IP4_TTL, RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS input field type and extended struct rte_eth_ipv4_flow and rte_eth_ipv6_flow to support filtering by tos, protocol and ttl. Signed-off-by: Jingjing Wu --- lib/librte_ether/rte_eth_ctrl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index ce224ad..248f719 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -337,9 +337,11 @@ enum rte_eth_input_set_field { RTE_ETH_INPUT_SET_L3_SRC_IP6, RTE_ETH_INPUT_SET_L3_DST_IP6, RTE_ETH_INPUT_SET_L3_IP4_TOS, + RTE_ETH_INPUT_SET_L3_IP4_TTL, 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_IP6_HOP_LIMITS, /* L4 */ RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT = 257, @@ -407,6 +409,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 */ + uint8_t proto; }; /** @@ -443,6 +448,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. */ + uint8_t hop_limits; }; /**