From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0050.outbound.protection.outlook.com [104.47.1.50]) by dpdk.org (Postfix) with ESMTP id 1DC291E409 for ; Mon, 11 Jun 2018 09:27:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nQt7tMwUQxHXmbv2PefWtgVpimU4jX/2vxDsGgzHStU=; b=FJ6P7ya2AefhjfVHxqvrZfut01ORcg651dHwT9F+kQh12lT3ZpFe2HvidWC/wVKJJYn3kxrmXYhZFM5pNKiT4+LkL7vwvKwVUfNET3gnkbva18pS4NtewFbgwCtKd4RAXhN3/faK7j/xa/Ui4mbbcmMgjLAjY+T1YCmrh/RzDkg= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3412.eurprd05.prod.outlook.com (10.171.187.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.15; Mon, 11 Jun 2018 07:27:22 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::691e:e228:13d0:1714]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::691e:e228:13d0:1714%4]) with mapi id 15.20.0841.019; Mon, 11 Jun 2018 07:27:22 +0000 From: Ori Kam To: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= CC: "ferruh.yigit@intel.com" , "declan.doherty@intel.com" , "dev@dpdk.org" , Adrien Mazarguil Thread-Topic: [RFC] ethdev: support tunnel encapsulation action Thread-Index: AQHT/OSxxmEF5JvuBkKCDoghxrZyxKRap/aAgAAIUWA= Date: Mon, 11 Jun 2018 07:27:22 +0000 Message-ID: References: <1528213708-5247-1-git-send-email-orika@mellanox.com> <20180611065317.tco5xy6eettg4obo@laranjeiro-vm.dev.6wind.com> In-Reply-To: <20180611065317.tco5xy6eettg4obo@laranjeiro-vm.dev.6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3412; 7:rAJ/mcJQ9etunwDJL5WNZy2O5dHfGhd+qBKdLLjvTaVyHjNrT1eBBV8kjmMvZuhoNjzSQOhUjSngBYmPBgAKVxA2a+2qzg2b5yWLg1EwhfOiBxvx0T29IoNEOTOd42JoiJ7saI62rKlrKe64WDRkn92aX53a8N1m011IB1ohwHF2bGvknsAuFKrJFYnMOeYYagEgoGMezmsc4WKroX1ydsPbHnu+YxnzpWFMBtuEh3pbGc5jlsv9beNTHKJ10/q8 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3412; x-ms-traffictypediagnostic: AM4PR05MB3412: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(189930954265078)(788757137089)(45079756050767)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:AM4PR05MB3412; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3412; x-forefront-prvs: 070092A9D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(366004)(39860400002)(39380400002)(189003)(199004)(13464003)(53546011)(14454004)(53946003)(6436002)(53936002)(97736004)(45080400002)(486006)(68736007)(25786009)(5250100002)(229853002)(966005)(11346002)(86362001)(478600001)(476003)(7736002)(305945005)(55016002)(9686003)(446003)(81156014)(105586002)(74316002)(66066001)(54906003)(99286004)(7696005)(59450400001)(6246003)(6306002)(2900100001)(81166006)(3660700001)(186003)(106356001)(8676002)(2906002)(5660300001)(76176011)(3280700002)(6506007)(316002)(26005)(102836004)(8936002)(4326008)(561944003)(33656002)(6916009)(3846002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3412; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: dGYPHnVQ6iqH7QZJ5EIbuTZAC2MqgU5qUL+LH5/VYYW6IuodjN4HJj1MbBYdegbKNFeFJWEmGpcXLd9ZQmVvHeAVT3PfcPwAd2PUr9Ef4TFYVBwQQhAAEXKIlPs8GRAxRy0YFYOadXP2c87vmIP4myCOwqplfqNLfJlnh9O2kEtAmxoTTepOIWA1CfD/GPmM spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 3b8bf1a1-c1ba-4b1d-5d17-08d5cf6cc5e9 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b8bf1a1-c1ba-4b1d-5d17-08d5cf6cc5e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2018 07:27:22.5805 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3412 Subject: Re: [dpdk-dev] [RFC] ethdev: support tunnel encapsulation action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 07:27:24 -0000 Hi No you shouldn't understand this. I still think that the [1] proposal is the correct=20 approach, but due to a very short time frame for this release I suggest this as intermediate solution. I want to get comments and open discussion regarding the proposal and in worst case add it to next release. Ori > -----Original Message----- > From: N=E9lio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > Sent: Monday, June 11, 2018 9:53 AM > To: Ori Kam > Cc: ferruh.yigit@intel.com; declan.doherty@intel.com; dev@dpdk.org; > Adrien Mazarguil > Subject: Re: [RFC] ethdev: support tunnel encapsulation action >=20 > Hi Ori, >=20 > Should we understand this proposal is nacked by [1] you have also > proposed? >=20 > If yes, answer to this one with a self-nack to make it clear. >=20 > Thanks, >=20 > On Tue, Jun 05, 2018 at 06:48:28PM +0300, Ori Kam wrote: > > This RFC contain proposal to add generic support for tunnel > > encapsulation/decapsulation. > > > > Due to the fact that there are many possible tunnel types > > and each tunnel type has number of header variations, there > > is a need for some generic command. > > > > example for tunnel headers in case of MPLSoGRE: > > ETH / VLAN / IPV4 / GRE / MPLS / ETH / IP / L4-L7 > > ETH / VLAN / IPV6 / GRE / MPLS / ETH / IP / L4-L7 > > ETH / IPV4 / GRE / MPLS / ETH / IP / L4-L7 > > ETH / IPV6 / GRE / MPLS / ETH / IP / L4-L7 > > ETH / VLAN / IPV4 / GRE / MPLS / IP / L4-L7 > > ETH / VLAN / IPV6 / GRE / MPLS / IP / L4-L7 > > ETH / IPV4 / GRE / MPLS / IP / L4-L7 > > ETH / IPV6 / GRE / MPLS / IP / L4-L7 > > > > As can be seen from the examples some of the encapsulation > > is done by overwriting the inner L2 packet spec. > > > > To support all of those configuration it is much > > easer if we create 2 encap functions one that > > is used to encap L2 packet and one that is used > > to encap L3 packet by removing the L2 and applying > > the encapsulation header. > > > > The use of void * buffer will enable the > > insertion of any valid encapsulation header. > > the use of such a buffer will also simplify the processing > > needed to validate and apply vs the use of rte_flow_items. > > The use of a buffer will also will be easer > > for some applications (for example vrouter) > > > > For decap we will also have 2 actions > > one for decaping a packet with inner L2 > > and one for decaping a packet with inner L3. > > when decaping L3 packet the user should > > supplay the L2 data which should be added to the inner packet. > > > > Signed-off-by: Ori Kam > > --- > > doc/guides/prog_guide/rte_flow.rst | 141 ++++++++++++++--------------= -- > - > > lib/librte_ethdev/rte_flow.h | 165 +++++++++++++++++++++-------= ---- > --- > > 2 files changed, 161 insertions(+), 145 deletions(-) > > > > diff --git a/doc/guides/prog_guide/rte_flow.rst > b/doc/guides/prog_guide/rte_flow.rst > > index b305a72..7417833 100644 > > --- a/doc/guides/prog_guide/rte_flow.rst > > +++ b/doc/guides/prog_guide/rte_flow.rst > > @@ -1969,112 +1969,95 @@ Implements ``OFPAT_PUSH_MPLS`` ("push a > new MPLS tag") as defined by the > > | ``ethertype`` | EtherType | > > +---------------+-----------+ > > > > -Action: ``VXLAN_ENCAP`` > > -^^^^^^^^^^^^^^^^^^^^^^^ > > - > > -Performs a VXLAN encapsulation action by encapsulating the matched > flow in the > > -VXLAN tunnel as defined in the``rte_flow_action_vxlan_encap`` flow > items > > -definition. > > +Action: ``TUNNEL_ENCAP`` > > +^^^^^^^^^^^^^^^^^^^^^^^^ > > > > -This action modifies the payload of matched flows. The flow definition > specified > > -in the ``rte_flow_action_tunnel_encap`` action structure must define a > valid > > -VLXAN network overlay which conforms with RFC 7348 (Virtual eXtensible > Local > > -Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 > Networks > > -over Layer 3 Networks). The pattern must be terminated with the > > -RTE_FLOW_ITEM_TYPE_END item type. > > +Perform a tunnel encapsulation action by encapsulating the matched flo= w > with > > +the given buffer. > > > > -.. _table_rte_flow_action_vxlan_encap: > > +This action modifies the payload of the matched flows. > > +The buffer must hold a valid tunnel encapsulation header. > > > > -.. table:: VXLAN_ENCAP > > +.. _table_rte_flow_action_tunnel_encap: > > > > +.. table:: TUNNEL_ENCAP > > + > > +----------------+-------------------------------------+ > > | Field | Value | > > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D+ > > - | ``definition`` | Tunnel end-point overlay definition | > > + | ``type`` | Encapsulation tunnel type. | > > + +----------------+-------------------------------------+ > > + | ``buf`` | The encapsulation header. | > > + +----------------+-------------------------------------+ > > + | ``len`` | Buf len. | > > +----------------+-------------------------------------+ > > > > -.. _table_rte_flow_action_vxlan_encap_example: > > - > > -.. table:: IPv4 VxLAN flow pattern example. > > - > > - +-------+----------+ > > - | Index | Item | > > - +=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > > - | 0 | Ethernet | > > - +-------+----------+ > > - | 1 | IPv4 | > > - +-------+----------+ > > - | 2 | UDP | > > - +-------+----------+ > > - | 3 | VXLAN | > > - +-------+----------+ > > - | 4 | END | > > - +-------+----------+ > > - > > -Action: ``VXLAN_DECAP`` > > -^^^^^^^^^^^^^^^^^^^^^^^ > > +Action: ``TUNNEL_DECAP`` > > +^^^^^^^^^^^^^^^^^^^^^^^^ > > > > -Performs a decapsulation action by stripping all headers of the VXLAN > tunnel > > -network overlay from the matched flow. > > +Perform a tunnel decapsulation on L2 inner packet > > > > -The flow items pattern defined for the flow rule with which a > ``VXLAN_DECAP`` > > -action is specified, must define a valid VXLAN tunnel as per RFC7348. = If the > > -flow pattern does not specify a valid VXLAN tunnel then a > > -RTE_FLOW_ERROR_TYPE_ACTION error should be returned. > > +This action modifies the payload of the matched flows. > > +The buffer must hold a valid tunnel encapsulation header. > > > > -This action modifies the payload of matched flows. > > +.. _table_rte_flow_action_tunnel_decap: > > > > -Action: ``NVGRE_ENCAP`` > > -^^^^^^^^^^^^^^^^^^^^^^^ > > +.. table:: TUNNEL_DECAP > > + > > + +----------------+-------------------------------------+ > > + | Field | Value | > > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D+ > > + | ``type`` | Encapsulation tunnel type. | > > + +----------------+-------------------------------------+ > > > > -Performs a NVGRE encapsulation action by encapsulating the matched > flow in the > > -NVGRE tunnel as defined in the``rte_flow_action_tunnel_encap`` flow > item > > -definition. > > +Action: ``TUNNEL_ENCAP_L3`` > > +^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > -This action modifies the payload of matched flows. The flow definition > specified > > -in the ``rte_flow_action_tunnel_encap`` action structure must defined = a > valid > > -NVGRE network overlay which conforms with RFC 7637 (NVGRE: Network > > -Virtualization Using Generic Routing Encapsulation). The pattern must = be > > -terminated with the RTE_FLOW_ITEM_TYPE_END item type. > > +Perform a tunnel encapsulation action by encapsulating the matched flo= w > with > > +the given buffer. > > +The given encapsulation is overwritten the original L2 part of the ori= ginal > > +packet. > > > > -.. _table_rte_flow_action_nvgre_encap: > > +This action modifies the payload of the matched flows. The buffer must > hold > > +a valid tunnel encapsulation header. > > > > -.. table:: NVGRE_ENCAP > > +.. _table_rte_flow_action_tunnel_encap_l3: > > > > +.. table:: TUNNEL_ENCAP_L3 > > + > > +----------------+-------------------------------------+ > > | Field | Value | > > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D+ > > - | ``definition`` | NVGRE end-point overlay definition | > > + | ``type`` | Encapsulation tunnel type. | > > + +----------------+-------------------------------------+ > > + | ``buf`` | The encapsulation header. | > > + +----------------+-------------------------------------+ > > + | ``len`` | Buf len. | > > +----------------+-------------------------------------+ > > > > -.. _table_rte_flow_action_nvgre_encap_example: > > - > > -.. table:: IPv4 NVGRE flow pattern example. > > - > > - +-------+----------+ > > - | Index | Item | > > - +=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > > - | 0 | Ethernet | > > - +-------+----------+ > > - | 1 | IPv4 | > > - +-------+----------+ > > - | 2 | NVGRE | > > - +-------+----------+ > > - | 3 | END | > > - +-------+----------+ > > +Action: ``TUNNEL_DECAP_L3`` > > +^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > -Action: ``NVGRE_DECAP`` > > -^^^^^^^^^^^^^^^^^^^^^^^ > > +Perform a tunnel decapsulation action by removing the encapsulating > packet header > > +and adding the L2 header which is suplied in the buf parameter. > > > > -Performs a decapsulation action by stripping all headers of the NVGRE > tunnel > > -network overlay from the matched flow. > > +This action modifies the payload of the matched flows. > > +The buffer must hold a valid L2 header and the flow must match pattera= n > with the > > +selected tunnel type. > > > > -The flow items pattern defined for the flow rule with which a > ``NVGRE_DECAP`` > > -action is specified, must define a valid NVGRE tunnel as per RFC7637. = If the > > -flow pattern does not specify a valid NVGRE tunnel then a > > -RTE_FLOW_ERROR_TYPE_ACTION error should be returned. > > +.. _table_rte_flow_action_tunnel_decap_l3: > > > > -This action modifies the payload of matched flows. > > +.. table:: TUNNEL_DECAP_L3 > > + > > + +----------------+-------------------------------------+ > > + | Field | Value | > > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D+ > > + | ``type`` | Encapsulation tunnel type. | > > + +----------------+-------------------------------------+ > > + | ``buf`` | The encapsulation header. | > > + +----------------+-------------------------------------+ > > + | ``len`` | Buf len. | > > + +----------------+-------------------------------------+ > > > > Negative types > > ~~~~~~~~~~~~~~ > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.= h > > index f8ba71c..cc01786 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -1473,40 +1473,74 @@ enum rte_flow_action_type { > > RTE_FLOW_ACTION_TYPE_OF_PUSH_MPLS, > > > > /** > > - * Encapsulate flow in VXLAN tunnel as defined in > > - * rte_flow_action_vxlan_encap action structure. > > + * Encapsulte a packet with tunnel header. > > + * > > + * See struct rte_flow_action_tunnel_encap. > > + */ > > + RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP, > > + > > + /** > > + * Encapsulte a packet with tunnel header replacing > > + * the inner L2 data. > > + * > > + * See struct rte_flow_action_tunnel_encap_l3. > > + */ > > + RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP_L3, > > + > > + /** > > + * Decapsulate outer most tunnel from matched flow. > > * > > - * See struct rte_flow_action_vxlan_encap. > > + * If flow pattern does not define a valid tunnel then > > + * the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION > > + * error. > > */ > > - RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP, > > + RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP, > > > > /** > > - * Decapsulate outer most VXLAN tunnel from matched flow. > > + * Decapsulate outer most tunnel from matched flow and replace > > + * the L2 header with the new header. > > + * Valid header must be L2 only. > > * > > - * If flow pattern does not define a valid VXLAN tunnel (as specified > by > > - * RFC7348) then the PMD should return a > RTE_FLOW_ERROR_TYPE_ACTION > > + * If flow pattern does not define a valid tunnel then > > + * the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION > > * error. > > + * > > + * See struct rte_flow_action_tunnel_decap_l3 > > */ > > - RTE_FLOW_ACTION_TYPE_VXLAN_DECAP, > > + RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP_L3, > > +}; > > > > +enum rte_flow_tunnel_type { > > /** > > - * Encapsulate flow in NVGRE tunnel defined in the > > - * rte_flow_action_nvgre_encap action structure. > > - * > > - * See struct rte_flow_action_nvgre_encap. > > + * VXLAN tunnel type. > > */ > > - RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP, > > + RTE_FLOW_TUNNEL_TYPE_VXLAN, > > > > /** > > - * Decapsulate outer most NVGRE tunnel from matched flow. > > - * > > - * If flow pattern does not define a valid NVGRE tunnel (as specified > by > > - * RFC7637) then the PMD should return a > RTE_FLOW_ERROR_TYPE_ACTION > > - * error. > > + * VXLAN_GPE tunnel type. > > */ > > - RTE_FLOW_ACTION_TYPE_NVGRE_DECAP, > > -}; > > + RTE_FLOW_TUNNEL_TYPE_VXLAN_GPE, > > > > + /** > > + * MPLSoGRE tunnel type. > > + */ > > + RTE_FLOW_TUNNEL_TYPE_MPLSoGRE, > > + > > + /** > > + * MPLSoUDP tunnel type. > > + */ > > + RTE_FLOW_TUNNEL_TYPE_MPLSoUDP, > > + > > + /** > > + * NVGRE tunnel type. > > + */ > > + RTE_FLOW_TUNNEL_TYPE_NVGRE, > > + > > + /** > > + * GRE tunnel type. > > + */ > > + RTE_FLOW_TUNNEL_TYPE_GRE, > > +}; > > /** > > * RTE_FLOW_ACTION_TYPE_MARK > > * > > @@ -1526,7 +1560,7 @@ struct rte_flow_action_mark { > > * @b EXPERIMENTAL: this structure may change without prior notice > > * > > * RTE_FLOW_ACTION_TYPE_JUMP > > - * > > + o* > > * Redirects packets to a group on the current device. > > * > > * In a hierarchy of groups, which can be used to represent physical o= r > logical > > @@ -1803,69 +1837,68 @@ struct rte_flow_action_of_push_mpls { > > * @warning > > * @b EXPERIMENTAL: this structure may change without prior notice > > * > > - * RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP > > - * > > - * VXLAN tunnel end-point encapsulation data definition > > + * RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP > > * > > - * The tunnel definition is provided through the flow item pattern, th= e > > - * provided pattern must conform to RFC7348 for the tunnel specified. = The > flow > > - * definition must be provided in order from the > RTE_FLOW_ITEM_TYPE_ETH > > - * definition up the end item which is specified by > RTE_FLOW_ITEM_TYPE_END. > > + * Tunnel end-point encapsulation data definition. > > * > > - * The mask field allows user to specify which fields in the flow item > > - * definitions can be ignored and which have valid data and can be use= d > > - * verbatim. > > - * > > - * Note: the last field is not used in the definition of a tunnel and = can be > > - * ignored. > > + * The tunnel definition is provided through the use of buffer that > > + * holds the encapsulating header. > > + * Provided header must be a valid outer tunnel header. > > + */ > > +struct rte_flow_action_tunnel_encap { > > + enum rte_flow_tunnel_type type; /**< The tunnel type. */ > > + void *buf; /**< The header to be used. */ > > + uint32_t len; /**< The buf len. */ > > +}; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > * > > - * Valid flow definition for RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP > include: > > + * RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP > > * > > - * - ETH / IPV4 / UDP / VXLAN / END > > - * - ETH / IPV6 / UDP / VXLAN / END > > - * - ETH / VLAN / IPV4 / UDP / VXLAN / END > > + * Tunnel end-point dencapsulation data definition. > > * > > + * The tunnel type must match the flow rule spec. > > */ > > -struct rte_flow_action_vxlan_encap { > > - /** > > - * Encapsulating vxlan tunnel definition > > - * (terminated by the END pattern item). > > - */ > > - struct rte_flow_item *definition; > > +struct rte_flow_action_tunnel_decap { > > + enum rte_flow_tunnel_type type; /**< The tunnel type. */ > > }; > > > > /** > > * @warning > > * @b EXPERIMENTAL: this structure may change without prior notice > > * > > - * RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP > > - * > > - * NVGRE tunnel end-point encapsulation data definition > > - * > > - * The tunnel definition is provided through the flow item pattern th= e > > - * provided pattern must conform with RFC7637. The flow definition mus= t > be > > - * provided in order from the RTE_FLOW_ITEM_TYPE_ETH definition up > the end item > > - * which is specified by RTE_FLOW_ITEM_TYPE_END. > > + * RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP_L3 > > * > > - * The mask field allows user to specify which fields in the flow item > > - * definitions can be ignored and which have valid data and can be use= d > > - * verbatim. > > + * Tunnel end-point encapsulation over the inner L2 data definition. > > * > > - * Note: the last field is not used in the definition of a tunnel and = can be > > - * ignored. > > + * The tunnel definition is provided through the use of buffer that > > + * holds the encapsulating header. > > + * Provided header must be a valid outer tunnel header. > > + */ > > +struct rte_flow_action_tunnel_encap_l3 { > > + enum rte_flow_tunnel_type type; /**< The tunnel type. */ > > + void *buf; /**< The header to be used. */ > > + uint32_t len; /**< The buf len. */ > > +}; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > * > > - * Valid flow definition for RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP > include: > > + * RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP_L3 > > * > > - * - ETH / IPV4 / NVGRE / END > > - * - ETH / VLAN / IPV6 / NVGRE / END > > + * Tunnel end-point dencapsulation data definition. > > + * after the decapsulation, the L2 of the resulted packet > > + * is replaced with the supplied buffer. > > * > > + * The tunnel type must match the flow rule spec. > > */ > > -struct rte_flow_action_nvgre_encap { > > - /** > > - * Encapsulating vxlan tunnel definition > > - * (terminated by the END pattern item). > > - */ > > - struct rte_flow_item *definition; > > +struct rte_flow_action_tunnel_decap_l3 { > > + enum rte_flow_tunnel_type type; /**< The tunnel type. */ > > + void *buf; /**< The L2 header to be used.*/ > > + uint32_t len; /**< The len of the buf. */ > > }; > > > > /* > > -- > > 1.7.1 > > >=20 > [1] > https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fdpd > k.org%2Fdev%2Fpatchwork%2Fpatch%2F40965%2F&data=3D02%7C01%7Corika > %40mellanox.com%7C371fe1d7e25544903bc008d5cf680813%7Ca652971c7d2 > e4d9ba6a4d149256f461b%7C0%7C0%7C636642968087329644&sdata=3DgChSJ2g > ypLJNQuWrui2aBtw1364RucnaT5hAj6WRNb4%3D&reserved=3D0 >=20 > -- > N=E9lio Laranjeiro > 6WIND