From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50057.outbound.protection.outlook.com [40.107.5.57]) by dpdk.org (Postfix) with ESMTP id 5E4A31B3AE for ; Mon, 22 Oct 2018 19:38:44 +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=cBkzYV0WGsi1qExAhLZLOtavWzxDY6DMwx9cCqBOLGY=; b=hg8QjvprOFPVxhzIZzBXExjUbPAccq5RUZxb+G8zMgDsCZAkOAsIYULz3Z84Z/AZBkyGPhx/aDtAlsegUOAfo73EX1iZl2Fv7JtoFgrYh6wdL4NirxBjwJ/e+p5wUwNuMqTG7dRakDwPvafS1KARqq2HI7R/e5DNN0zyQijODNk= Received: from mellanox.com (37.142.13.130) by AM4PR05MB3426.eurprd05.prod.outlook.com (2603:10a6:205:6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Mon, 22 Oct 2018 17:38:40 +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@6wind.com Cc: dev@dpdk.org, dekelp@mellanox.com, thomas@monjalon.net, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, orika@mellanox.com, shahafs@mellanox.com Date: Mon, 22 Oct 2018 17:38:08 +0000 Message-Id: <1540229891-112870-1-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539796072-111646-1-git-send-email-orika@mellanox.com> References: <1539796072-111646-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: CWLP265CA0300.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:5d::24) To AM4PR05MB3426.eurprd05.prod.outlook.com (2603:10a6:205:6::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1477cce6-9aeb-4135-a1dd-08d638453559 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:AM4PR05MB3426; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3426; 3:aoEWFXK/QRxwNfAEMNNrke8jTRp4rd1X3/sy2fFRsok7T0fojrnHGkNzHuZOSbILbIi3aICr69bnJatt1OaRrGhYT84XeM/7zgIz5I25+OYHVSBlSABklr0Apz3fJGxDdB9sQYzsovm6JIP4nBGi2AVU7OZoSXAWd21jpcw+cZn4eTbVmGojVXH6s/bRjs6kGEiI7R38hfhZtKiTcPJ42NRDHUMMMWJ477vtISrZXxwcM4oF5BHUWi5xdybjyj4M; 25:78XU393KMxk+PNJcCGFnv+TK3hxPHhqJUR5kWgf30k9mcq2nWOAWd+g+kGs0xFioUauWQxkkYREw4kw8c/phe8RltXDMaPH3ecxAMPoj9Mv1EPrU9/49B2q+woVayOgCdfn5TbD8VJTB/kCfmhEHPpgDI9SWpeTkciLQ+0dmVZJoMT0sceALGT7JftwNlrNbUnDFZq4PTNItmSUYoJ8duCmxzRMh9+/Cq1mujz9xYzjzRyO/KZ0J2uIH4LiB7hkYLf582AuQK9LSVDam7+jEQT59ChyPc4X2EoVuTS6LxdSs8zWQXcNX5Nq5vNry3Qtge3oBxoy1peKnU5NkLkY1Gw==; 31:jPiDRwaRy3Uy0lCH5bDInUuE5qw67ttYzs0F319Q5RVOOXbw9MhLor+pYuKlok+OgNIWHuOKNhpd3xKz6xK4rNRiKFulNp6Q2hAIL6i5JRIQoxttlJV5F2+j2nz55WRl+5R8qduYhAEuox8xS/pJalBmyMxxregnQNYp0qVJExbT/EqLAJ4nJGa6Ir/BIt2r7yclLVfagrTU6Z3swx601TUHyRLNXjKaVNSBkMltTaU= X-MS-TrafficTypeDiagnostic: AM4PR05MB3426: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3426; 20:H32cvJtz44Wd+Hk2LDjIQRGSyJvM6mt145DUENF430o2Cx08KIJRI6dzd5hJoyP42QcmtHxAKrW49onaWZfqLE2bl8fzQtX2vPwBX+CrM5U+9G4Hc500ryC/IZKFtpSAKbOe7H6d3M63Wc7uUrzLJ3Xf7Mhx1z2KIPfxyoAupzQ3x4Q3tNeL9rCmqBext3TvgbAamXc5BfdaLsdeuuO1wzg8mjkUe5GCBljIIMG57kulhnhsKrmFrMDJO5/NE5sZGTRX0XY6qEaWmrepoCMOuIbZRdvx7X80eOtdpnMGoamgMx4zcu2FA6XiC6o2Mq6UlfrZoXuubxZTqZ+drawSU7gsxdU1kVpfVTp8ywNjTR8P3N4UL6gTqV8re1xWh4EuWqspo15g6niKxIZ28IiHBgi1y42o6/3errCJfeZSetI8RrvdCvNBoW3P7IJwkw7znWA/ve/WcKB3cxhOeRYhhwq5f7BXGjCccj/zyb1GcYDKoLp5xekjBNGYOzJ1fvDn; 4:UE5vZx0T4DzdMv1CCURCK4Bn/ngmS2hodJxIZaBti5ZRmYcPOHenW3EzO05/FU8KZHQBMP6oGYGOvXJqfe6WRR4sItRVY3qMZCRQS9idD7rruUyiOTgfiL/TYKnSSSq6JgaLXxOhAwmPyV5mQe1piZSaxJ4uK2khTuVNLnCf59TSUAYWffS+tzdbh8nCxXMc9Xif1yCf8y0JerKyukBS5/bV4a2WDn1mMFWbzYHUYviWg49Q6IrR+VSf9jvD1gpJR75Wpon9PZMaUF0Cly4Euw== 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)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:AM4PR05MB3426; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3426; X-Forefront-PRVS: 08331F819E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(366004)(39860400002)(396003)(189003)(199004)(97736004)(478600001)(186003)(386003)(5660300001)(106356001)(6346003)(4326008)(66066001)(81166006)(81156014)(16586007)(105586002)(7416002)(26005)(53936002)(55016002)(8886007)(48376002)(4720700003)(6306002)(68736007)(33026002)(50466002)(3846002)(7696005)(2906002)(14444005)(51416003)(486006)(107886003)(16526019)(36756003)(50226002)(6666004)(8676002)(316002)(446003)(52116002)(76176011)(8936002)(956004)(21086003)(69596002)(305945005)(7736002)(6116002)(25786009)(476003)(2616005)(47776003)(11346002)(86362001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3426; H:mellanox.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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR05MB3426; 23:LUScGCN2X7SqNWlG35aaWYqkilGxJRqi/MHxIvGzV?= =?us-ascii?Q?gSIzDY+YNBZyb0uXRyWLGeAFpdlOzcH9rLwLjTntRscWXX4lIwHI3Rq3Ih0w?= =?us-ascii?Q?9o16smrpyFcf0lL2+9xiCtz35sGdrvYdul/D9v46T54fwOA6htcnYUCDv/jL?= =?us-ascii?Q?Q4oq6PK0DBnj18Q3DurIKGN5tXHHoicUSGIm3+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oQdq6fOQtC2IW2F+KGGn7L7gR8SRSJ+zFAMzAWHoEPLYx7tw646ciHv/C?= =?us-ascii?Q?SJuyJavXFC8hflibrJAqqFoWccmeqfMo+WgMYwJs089EQ0tCCl+iBHP41GJ3?= =?us-ascii?Q?52xPg3Kukph+mwIWjaIxQQNcT1F1kXIVqneGhGwKYHAujsHBkNtn/pp8mBWR?= =?us-ascii?Q?mT87ROSrCv93RgvkZ245TafObQeaBe84AYgXgRPX70AF40XBoD6orwBD/HFU?= =?us-ascii?Q?OWZWYGD29aNOuaMl+Ko+np98tecdgL+u7TbXCypWNmxrV3fj1KKF8crPAwnk?= =?us-ascii?Q?p2h9A=3D=3D?= X-Microsoft-Antispam-Message-Info: v/7wWJumROq/H0BNw33gScJa+QrJB663ZUpcyDF3MxS4S8kbb1ZxgZdl/9zKXnbAzcs1Fxl48ZWi4x31OjYnuxZUVhHCujX+rbbM0PnjFI+nn33XQyP1YolrrE50v5fji7brHX8xPDlAW2kiB7uf4ddqHuViavKOlEC5+ZVynjxOqwwZ117vNgQMPA6coWfsDOynatpmlfkMS3eLg+OWvrQOuyv05ivDE37MToVEKqRA0gsoNpytw2MkyzqcGY1oPsG8UvDfg/dz+wQdR0ywm0SRufLh3DD39iDiL+3D2wz9vnVRHG8L5AI0t4RBKPs0ny4Dzdsoc9qhkLkjR10JG+qYNu7M5QRKfxcy5TRVzO0= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3426; 6:c8XlyGX1vAxjaKXzfc9Qe2kEsjwJrvr6iS2V3zykYghGy6orQOouSbP4nSofi1gUSCEz4QSextm/7jC4gYlvnxmV88jjsaNLsKEUjpHYdlPVG7f4eIFeFNAsPSu7Uh81Z7JrDFIant383WZXuJQXXlzbzpF/YGUgYgEbcE+wr4TRLnP/YDiY1w1xz1O1TwXRzih8m13IlrjVHf46079mfFisCEO0jxedd5GpQ8k4AhNB5QPZT0n0Nj5TJN1DJDYK+xJ+5NS/7sJQKBVi+OymqV7OBcK1ohHofr25MY19fBw5IJLrlxqs22RFrLFn7Ipcd5BoSJCnwBXIm1y7G+PhiRQzSpiLR7mOxlE26X06I+NRXgOoFSCx7Wa1urMd/eAernf1Cu9Zn+93UJNVVCZHF4ctmacKJ9MH4E3gRFe2E0Q3ag8D2YgBk+fP6eKZNTicoaSN4WOC7Cq7cwdLFsRHxA==; 5:B+Dp86qxta/W1sZXQnxHZvx8Kihe/ZpAzReCBazjbL6jmcg0skw6ReS6tKcKfn8TwrVwI2d0+n3o3CZlP3dZBVEX2CmTxIfxBcB8PGxjwQzrI7FPAx6ozqOV86CN9zmBWJe+Ptr9rbt0mzHKLsnxOTpJXgA9vrIC82sLl9rfDn0=; 7:xcE8EIVuQdmBGbiJDrSFCixZJKqzDFponC6t7EeizzstUBe3I3ORIasnvY1RzaMbU/zDXzBlctPL1zg+ueTdr4ryRwy+GpJthI39RAxw5N27oJGeaTpuRVf6uVPVtLdaR/uqKw1mNo93EoblDH/SAI2axkYPstkeK6BI1R/YLhJpK4f6rDsQElO4IqbXzsB3ggH8K3NBeS2uo9D2+H2Ad4SZ2FmW4Cevlt4OGS1UQCqdwpe1dnqixQ4KV752s/Lj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2018 17:38:40.4879 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1477cce6-9aeb-4135-a1dd-08d638453559 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3426 Subject: [dpdk-dev] [PATCH v6 0/3] ethdev: add generic raw tunnel encapsulation 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, 22 Oct 2018 17:38:44 -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. 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. 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 order 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 actions, the same as with vxlan_encap. [1]https://mails.dpdk.org/archives/dev/2018-August/109944.html v6: * fix compilation error * fix typo. v5: * fix typos. 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 | 597 ++++++++++++++++++++++++++ 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, 1686 insertions(+) -- 1.8.3.1