From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2BA2E91CD for ; Tue, 26 Jan 2016 07:20:47 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 25 Jan 2016 22:20:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,348,1449561600"; d="scan'208";a="36220388" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 25 Jan 2016 22:20:46 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u0Q6Kild021462; Tue, 26 Jan 2016 14:20:44 +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 u0Q6Kef2005799; Tue, 26 Jan 2016 14:20:42 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0Q6KeUh005795; Tue, 26 Jan 2016 14:20:40 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Tue, 26 Jan 2016 14:20:19 +0800 Message-Id: <1453789224-5716-8-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 07/12] librte_ether: extend rte_eth_fdir_flow to support tunnel format 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: , X-List-Received-Date: Tue, 26 Jan 2016 06:20:47 -0000 This patch changed rte_eth_fdir_flow from union to struct to support more packets formats, for example, Vxlan and GRE tunnel packets with IP inner frame. This patch also add new RTE_FDIR_TUNNEL_TYPE_GRE enum. Signed-off-by: Jingjing Wu --- doc/guides/rel_notes/release_2_3.rst | 4 ++++ lib/librte_ether/rte_eth_ctrl.h | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst index 99de186..2216fee 100644 --- a/doc/guides/rel_notes/release_2_3.rst +++ b/doc/guides/rel_notes/release_2_3.rst @@ -39,6 +39,10 @@ API Changes ABI Changes ----------- +* The ethdev flow director structure ``rte_eth_fdir_flow`` structure was + changed. New fields were added to extend flow director's input set, and + organizing is also changed to support multiple input format. + Shared Library Versions ----------------------- diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 248f719..eb4c13d 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -495,6 +495,7 @@ enum rte_eth_fdir_tunnel_type { RTE_FDIR_TUNNEL_TYPE_UNKNOWN = 0, RTE_FDIR_TUNNEL_TYPE_NVGRE, RTE_FDIR_TUNNEL_TYPE_VXLAN, + RTE_FDIR_TUNNEL_TYPE_GRE, }; /** @@ -508,18 +509,20 @@ struct rte_eth_tunnel_flow { }; /** - * An union contains the inputs for all types of flow + * A struct contains the inputs for all types of flow */ -union rte_eth_fdir_flow { - struct rte_eth_l2_flow l2_flow; - struct rte_eth_udpv4_flow udp4_flow; - struct rte_eth_tcpv4_flow tcp4_flow; - struct rte_eth_sctpv4_flow sctp4_flow; - struct rte_eth_ipv4_flow ip4_flow; - struct rte_eth_udpv6_flow udp6_flow; - struct rte_eth_tcpv6_flow tcp6_flow; - struct rte_eth_sctpv6_flow sctp6_flow; - struct rte_eth_ipv6_flow ipv6_flow; +struct rte_eth_fdir_flow { + union { + struct rte_eth_l2_flow l2_flow; + struct rte_eth_udpv4_flow udp4_flow; + struct rte_eth_tcpv4_flow tcp4_flow; + struct rte_eth_sctpv4_flow sctp4_flow; + struct rte_eth_ipv4_flow ip4_flow; + struct rte_eth_udpv6_flow udp6_flow; + struct rte_eth_tcpv6_flow tcp6_flow; + struct rte_eth_sctpv6_flow sctp6_flow; + struct rte_eth_ipv6_flow ipv6_flow; + }; struct rte_eth_mac_vlan_flow mac_vlan_flow; struct rte_eth_tunnel_flow tunnel_flow; }; @@ -540,7 +543,7 @@ struct rte_eth_fdir_flow_ext { */ struct rte_eth_fdir_input { uint16_t flow_type; - union rte_eth_fdir_flow flow; + struct rte_eth_fdir_flow flow; /**< Flow fields to match, dependent on flow_type */ struct rte_eth_fdir_flow_ext flow_ext; /**< Additional fields to match */ -- 2.4.0