From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A250E2BAA for ; Thu, 25 Feb 2016 04:26:59 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 24 Feb 2016 19:26:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,496,1449561600"; d="scan'208";a="923425190" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 24 Feb 2016 19:26:58 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 24 Feb 2016 19:26:58 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 24 Feb 2016 19:26:57 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.132]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002; Thu, 25 Feb 2016 11:26:55 +0800 From: "Wu, Jingjing" To: Rahul Lakkireddy , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 01/10] ethdev: add a generic flow and new behavior switch to fdir Thread-Index: AQHRXl2O2ykVEax5GUexEPMkzwoKN588IuFQ Date: Thu, 25 Feb 2016 03:26:54 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8DC92CA@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Kumar Sanghvi , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 01/10] ethdev: add a generic flow and new behavior switch to fdir 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: Thu, 25 Feb 2016 03:27:00 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rahul Lakkireddy > Sent: Wednesday, February 03, 2016 4:32 PM > To: dev@dpdk.org > Cc: Kumar Sanghvi; Nirranjan Kirubaharan > Subject: [dpdk-dev] [PATCH 01/10] ethdev: add a generic flow and new > behavior switch to fdir >=20 > Add a new raw packet flow that allows specifying generic flow input. >=20 > Add the ability to provide masks for fields in flow to allow range of val= ues. >=20 > Add a new behavior switch. >=20 > Add the ability to provide behavior arguments to allow rewriting matched > fields with new values. Ex: allows to provide new ip and port addresses t= o > rewrite the fields of packets matching a filter rule before NAT'ing. >=20 > Signed-off-by: Rahul Lakkireddy > Signed-off-by: Kumar Sanghvi > --- > doc/guides/rel_notes/release_2_3.rst | 3 +++ > lib/librte_ether/rte_eth_ctrl.h | 15 ++++++++++++++- > 2 files changed, 17 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/rel_notes/release_2_3.rst > b/doc/guides/rel_notes/release_2_3.rst > index 99de186..19ce954 100644 > --- a/doc/guides/rel_notes/release_2_3.rst > +++ b/doc/guides/rel_notes/release_2_3.rst > @@ -39,6 +39,9 @@ API Changes > ABI Changes > ----------- >=20 > +* New flow type ``RTE_ETH_FLOW_RAW_PKT`` had been introduced and > hence > + ``RTE_ETH_FLOW_MAX`` had been increased to 19. > + >=20 Great to see a raw_pkt_flow type. And there is already a flow type "RTE_ETH_FLOW_RAW", it's not necessary to = add a new one. > Shared Library Versions > ----------------------- > diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_c= trl.h > index ce224ad..1bc0d03 100644 > --- a/lib/librte_ether/rte_eth_ctrl.h > +++ b/lib/librte_ether/rte_eth_ctrl.h > @@ -74,7 +74,8 @@ extern "C" { > #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 > +#define RTE_ETH_FLOW_RAW_PKT 18 > +#define RTE_ETH_FLOW_MAX 19 >=20 > /** > * Feature filter types > @@ -499,6 +500,9 @@ struct rte_eth_tunnel_flow { > struct ether_addr mac_addr; /**< Mac address to match. *= / > }; >=20 > +/**< Max length of raw packet in bytes. */ #define > +RTE_ETH_RAW_PKT_FLOW_MAX_LEN 256 > + > /** > * An union contains the inputs for all types of flow > */ > @@ -514,6 +518,7 @@ union rte_eth_fdir_flow { > struct rte_eth_ipv6_flow ipv6_flow; > struct rte_eth_mac_vlan_flow mac_vlan_flow; > struct rte_eth_tunnel_flow tunnel_flow; > + uint8_t raw_pkt_flow[RTE_ETH_RAW_PKT_FLOW_MAX_LEN]; > }; >=20 > /** > @@ -534,6 +539,8 @@ struct rte_eth_fdir_input { > uint16_t flow_type; > union rte_eth_fdir_flow flow; > /**< Flow fields to match, dependent on flow_type */ > + union rte_eth_fdir_flow flow_mask; > + /**< Mask for the fields matched, dependent on flow */ > struct rte_eth_fdir_flow_ext flow_ext; > /**< Additional fields to match */ > }; > @@ -545,6 +552,7 @@ enum rte_eth_fdir_behavior { > RTE_ETH_FDIR_ACCEPT =3D 0, > RTE_ETH_FDIR_REJECT, > RTE_ETH_FDIR_PASSTHRU, > + RTE_ETH_FDIR_SWITCH, > }; >=20 > /** > @@ -558,6 +566,9 @@ enum rte_eth_fdir_status { > RTE_ETH_FDIR_REPORT_FLEX_8, /**< Report 8 flex bytes. */ > }; >=20 > +/**< Max # of behavior arguments */ > +#define RTE_ETH_BEHAVIOR_ARG_MAX_LEN 256 > + > /** > * A structure used to define an action when match FDIR packet filter. > */ > @@ -569,6 +580,8 @@ struct rte_eth_fdir_action { > /**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or > RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the > reported > flex bytes start from in flexible payload. */ > + uint8_t behavior_arg[RTE_ETH_BEHAVIOR_ARG_MAX_LEN]; > + /**< Extra arguments for behavior taken */ > }; >=20 > /** > -- > 2.5.3