From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00060.outbound.protection.outlook.com [40.107.0.60]) by dpdk.org (Postfix) with ESMTP id 87C5A2F4F for ; Tue, 16 Oct 2018 23:41:00 +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=hHNwwIdRDS0NqkwsW1Xl5K2IRKR564xeVpyg3yx9psQ=; b=s+vFDogF9zbM9fOFvdoepUTJobtXdsMy27GFOcDXWC1vKbBVh2XNyrQz0d2gJFIJ2uTpV/3CpuyunOLoStXP9ziYLWi7qMNOYtU0MQhWYVMrnznjRdSBQFdY00fvlWebz/B7F04lneiHVbOeBp8AvBc/WrOqR5MQpW9cvm/Qufk= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3185.eurprd05.prod.outlook.com (10.171.186.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Tue, 16 Oct 2018 21:40:58 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202%4]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 21:40:58 +0000 From: Ori Kam To: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , "arybchenko@solarflare.com" , "ferruh.yigit@intel.com" , "stephen@networkplumber.org" , Adrien Mazarguil CC: "dev@dpdk.org" , Dekel Peled , Thomas Monjalon , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , Yongseok Koh , Ori Kam , Shahaf Shuler Thread-Topic: [PATCH v4 0/3] ethdev: add generic raw tunnel encapsulation actions Thread-Index: AQHUZZjsukOeBRHlXkC+8HyKn5/wag== Date: Tue, 16 Oct 2018 21:40:58 +0000 Message-ID: <1539726023-14402-1-git-send-email-orika@mellanox.com> References: <1538917054-68283-1-git-send-email-orika@mellanox.com> In-Reply-To: <1538917054-68283-1-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: DB6PR05CA0015.eurprd05.prod.outlook.com (2603:10a6:6:14::28) To AM4PR05MB3425.eurprd05.prod.outlook.com (2603:10a6:205:6::14) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3185; 6:J5ToIBhJ2s5tkU6K2ygRKQMSgip4mRDIoYAo8bWcHtq6+CbSWeiz78FIGJgfKI8e85jZ0dJgX/9XvSpKbMm++2hIhxvVBAXAQQkKSdON32vQas+niBOXTYYcOI90JGixL2PMAqcXrUc5xyyP7xsOOR8dyf2Tg/TfqSnENoKgMDxgEMScF4QH3KB8YHtM8ZnAKmNPhjE6x8Umd/RMQHXlegqpAyPuBN+0i3qLoTJepG+f6Dgp1jrSyXkfWMNQrlolRGJHLF9eLIjQzi7n3+m1wqbPqUg11JKQSEtsUez8ctGyc98Z+yFAm0UW/02Z32E4dBCkklFCRIaGK1zx6sdmz2lRZMV1sxOq2gvbW9htTKkQxILs/scP5exWCCaqb+utrEK4yyJIhwzZlqXopya/uRb4fTO5aj+z5wudQLvbim9OXd6kaXmZLOfAsmGASQffEqlGH1Vfkr2SlVKwGR+GgQ==; 5:/aXDFNrBxegU1tCzbeftNd9+P0TGFrhT0i0/+V2XyMT6C18bytud/zFQly8YrLqC+FyNHv9/a9h7/eU0YS33ubsTOB64PSnUf6nCzEg9Qly4cceZBV8fHtvlJqrsWJrLAgxiRd1tKFHju/YxnxUGMK9jGjooaQ/LXN+dIQdBnhY=; 7:1JOmqbXU+kDlpU0aceQVxzTOO6u4I+6AQiaKKHauR6tVSJpF1vScuI5jYDIRUTnXzCaEuHCTEkeN5gWeqWurVMuxi+F3kkg8lJJquEiHq68oWaPFG2f6nOSDo8E+IqZo/I41S/QCeOyo6c5No4x6Emy8H0ZURMdDXBJYFe87BMfOOObbJ7hdpvV8h0aNGL9+Hq2GXBBUnceEJT1fCwdJzICqlPqiDrAoLVeCu49PfQis1LtUKSMrTUYvqQQUG4tR x-ms-office365-filtering-correlation-id: 54c4ea54-b392-4b93-7077-08d633b00efe x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3185; x-ms-traffictypediagnostic: AM4PR05MB3185: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991076); SRVR:AM4PR05MB3185; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3185; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(346002)(39860400002)(376002)(199004)(189003)(2900100001)(5250100002)(107886003)(71200400001)(3846002)(6116002)(476003)(478600001)(53936002)(2616005)(11346002)(446003)(4326008)(6306002)(14444005)(102836004)(14454004)(6436002)(2906002)(256004)(6486002)(71190400001)(186003)(6346003)(26005)(6512007)(66066001)(76176011)(36756003)(110136005)(54906003)(305945005)(86362001)(7416002)(52116002)(2501003)(386003)(7736002)(6506007)(5660300001)(2201001)(68736007)(316002)(25786009)(97736004)(486006)(106356001)(81166006)(81156014)(8936002)(99286004)(8676002)(105586002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3185; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-microsoft-antispam-message-info: 8A1TPDKGSGAbx/57WnBLrVBXkqXZVMdLnbVTuHt026V4FaTZc7pVPtKAXGn7hYuUdS91WwWfX9SJxpBAyn4J6vMO6nGPdfoOZOAMY7ijKdVozqHf7A5282QA+TvLBkJphUJ4Q7i9pyUqzLXFnZB4GeyznRxkJfUXpDzFzcYEE3VJ5manzdgduQ0DDsvjA1P5IBFp3od+5FWJGNASGcGHDfEbaAugTR5huTUwWuSjocR7HppFS0BQQo3YsaxYVrp2EqVy3tD3kXXY4z+buSIoTOmNT6fWFhR9KT8vKP8Rbq+3hiVhxpKeLLaTemfAJGil9RjEYoG3co7ygeko9UYr3VP9NP+IY+cEzLUI8ztLe+M= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54c4ea54-b392-4b93-7077-08d633b00efe X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 21:40:58.5905 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3185 Subject: [dpdk-dev] [PATCH v4 0/3] ethdev: add generic raw tunnel encapsulation actions 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: Tue, 16 Oct 2018 21:41:00 -0000 This series implement the raw tunnel encapsulation actions and is based on rfc [1] "add generic L2/L3 tunnel encapsulation actions" Currenlty the encap/decap actions only support encapsulation of VXLAN and NVGRE L2 packets (L2 encapsulation is where the inner packet has a valid Ethernet header, while L3 encapsulation is where the inner packet doesn't have the Ethernet header). In addtion the parameter to to the encap action is a list of rte items, this results in 2 extra translation, between the application to the action and from the action to the NIC. This results in negetive impact on the insertion performance. =20 Looking forward there are going to be a need to support many more tunnel encapsulations. For example MPLSoGRE, MPLSoUDP. Adding the new encapsulation will result in duplication of code. For example the code for handling NVGRE and VXLAN are exactly the same, and each new tunnel will have the same exact structure. =20 This series introduce a raw encapsulation that can support both L2 and L3 tunnel encapsulation. In order to encap l3 tunnel for example MPLSoDUP: ETH / IPV4 / UDP / MPLS / IPV4 / L4 .. L7 When creating the flow rule we add 2 actions, the first one is decap in ord= er to remove the original L2 of the packet and then the encap with the tunnel = data. Decapsulating such a tunnel is done in the following order, first decap the outer tunnel and then encap the packet with the L2 header. It is important to notice that from the Nic and PMD both actionsn happens simultaneously, meaning that at we are always having a valid packet. This series also inroduce the following commands for testpmd: * l2_encap * l2_decap * mplsogre_encap * mplsogre_decap * mplsoudp_encap * mplsoudp_decap along with helper function to set teh headers that will be used for the act= ions, the same as with vxlan_encap. [1]https://mails.dpdk.org/archives/dev/2018-August/109944.html v4: * convert to raw encap/decap, according to Adrien suggestion. * keep the old vxlan and nvgre encapsulation commands. v3: * rebase on tip. v2: * add missing decap_l3 structure. * fix typo. Ori Kam (3): ethdev: add raw encapsulation action app/testpmd: add MPLSoUDP encapsulation app/testpmd: add MPLSoGRE encapsulation app/test-pmd/cmdline.c | 637 ++++++++++++++++++++++++= ++++ app/test-pmd/cmdline_flow.c | 595 ++++++++++++++++++++++++= ++ app/test-pmd/testpmd.h | 62 +++ doc/guides/prog_guide/rte_flow.rst | 51 +++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 278 ++++++++++++ lib/librte_ethdev/rte_flow.c | 2 + lib/librte_ethdev/rte_flow.h | 59 +++ 7 files changed, 1684 insertions(+) --=20 1.8.3.1