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 D03377CB0 for ; Wed, 17 Oct 2018 19:08:46 +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=IRhO4rbeEQ6QxzSXLKWtCnGAG+kMIDgtNO5wE/ogJWE=; b=H1uz3Z1JDBrMDIgHbpHThF0FZkaFazybkGqRmh8i4kAGrvjvr4GIRv6BSNG1gF7D0CnF4rJLWiafwgFneI4J+e62dozcMDiFeK67c2ZVoz9vDBL9KBvhCS4J7RCzA5EfCvFAlDkz94mYVpDfIJrIVlf5OAPD9EdIJdTgsoU/U7Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR05MB3440.eurprd05.prod.outlook.com (2603:10a6:802:1e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.26; Wed, 17 Oct 2018 17:08:41 +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: Wed, 17 Oct 2018 17:07:49 +0000 Message-Id: <1539796072-111646-1-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539726023-14402-1-git-send-email-orika@mellanox.com> References: <1539726023-14402-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: CWLP265CA0320.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:57::20) To VI1PR05MB3440.eurprd05.prod.outlook.com (2603:10a6:802:1e::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 420e509c-8cf6-48f1-1cd3-08d634533171 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB3440; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3440; 3:44GvFhVXo6ydVcoe2P0x5Mtzg8Wxsmaxr7EVvAu0B39DshRH/+3z7KaW/fQoZyLlI1inHDy4PUVchgaD57GoxqJEoCaBT1YdkDBvN8bfh9YhhNMhVNJatkgOKirYF/tBePNaoUZfyzT1aWV2fEZZSFAUqIMQO8XmdZiOaGRd6bTTxKgRx+lVhEeDzbJLAjoLna/BFzHzR1zycT8zZT8rHeFXJI0wpldiuBbyYt4XrbQuglZLjvJ2qonM4HCknwIX; 25:maIrUcVVLiTc9TS/ZcFnGxkKwl2psW4PTAZMc4r6z1DzYI9IpkajMWEkmzpUatgGlHWJmNc3TjWCEKOjBgtJOWq/jkyLDx0dL0KY4E9LV+uV8G4BQTedE0d4w6+p8KnZ4o0mO8ei8w1WII5SFnZB3Bcqc5qMc5mNR1dD2DaHlUnABo+lsaalQISEH4JECsXyXuxUm6o7pEoI8lXLLrma2k43OFu0cfHf1/saGvRId0SuVocLS7Gosbguywqxcr1YT2pDY2D5IZkQ4zMlntS0rvepBZKRh5UeLNyJjqaPzKLLLrdm2VbykRITbFkPo8flMqR6Pvad2uH45yYxOMoylQ==; 31:/PTtwANX2Th+ly64cdjwRP1yDHy8PojHa89bfdld6+lxS1l/wRgCUH746NrOhSEdCR72bBpDRdcG2XDtFEEqDxuHOkSs7hpZSmMH06Ep72Toozxqgn2DLSw1E+JltkdpTWmF6bKmwQ8LrRCSIZIpysMuI/BNiyo4aflvpysuNn2EEbHNGatM5bboAFYX9VHdPPiRi/MupZhm3xr+V4/CxYJ7ZUKxfCvHjF1X9Cj50RE= X-MS-TrafficTypeDiagnostic: VI1PR05MB3440: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3440; 20:z4iat1aNmlwuWFxc3q+8lX19On6Dj7DF1Lcdsmra5oXEtSFN8sB87TI7D/VnLICT74NNb8ImP+gXymdsIN1iNiuARxULJ6VfrxkGOrvn9p9RVfrHVFfJ0rmnnGVs+kdZewt0lyfqmVUo2am9K4ES2QqY+jxjpYHrclxzAbG9YOATpkOGxrpzSgMyRW7jar5ujUIDlg06Z6UVHqoToWExB8oyZIRf14OV2kaRH8I+zpmkgR8VJMJT/y282Zph5EnsYuRmWrRy13vwei208gnqPvr6GKabvpTTjZuzIxL0VBFpOU8GgVy2on7haddyS4q7pNSTHTtn9CpkwQfJxLzpsMfMx94mz8kmquKDWMOH737sm10NlenO5oBboi/x/Tf2lCnp9aobLVRoT+qehpOtJFlBfxC64THzUkitFUBS+neV75YIHd9wYMwDQvxmeKckLuBQudW8yHzHOp+amR8914QSEdUC2D2xj7be2m03IEpAngswW5YWu9eM6fKQ95Za; 4:lr4Qy0j9Kv5E7L0PlzWdPvmHcKY3eH/hsTWuhleBn22fOOgJUNn5F4M1eMl8Dor8T6XMdaBlkroAlBrSPYyfNUNT5vBHYS/YBFxbeMvV2CP36QjKIWUi5mQPaZQsGpTSBeAFDfMrf4kbiqJIqDPq9Wpefj7xyv8tdH5V10U+ctam3lC/lbLfmVbd3IzKx5TyUctnmK01agpLYBrRtoUn0h1sN6w0zmm/plZwbyGXNh1XIKvGM/FXbLdrKzPm9UfEwlE0ATCktJTUGocLhTdFxQ== 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)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:VI1PR05MB3440; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB3440; X-Forefront-PRVS: 08286A0BE2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(136003)(396003)(376002)(366004)(199004)(189003)(48376002)(186003)(6306002)(25786009)(53936002)(4720700003)(4326008)(16526019)(47776003)(7416002)(66066001)(8936002)(7736002)(305945005)(86362001)(14444005)(26005)(55016002)(3846002)(33026002)(6116002)(2906002)(68736007)(386003)(50226002)(446003)(478600001)(51416003)(476003)(2616005)(4743002)(8886007)(50466002)(81166006)(97736004)(956004)(21086003)(69596002)(52116002)(81156014)(7696005)(316002)(36756003)(8676002)(5660300001)(106356001)(107886003)(486006)(76176011)(11346002)(105586002)(16586007)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3440; H:mellanox.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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3440; 23:WVUK6hU8g5Gjl2YKAnpYgbYg24U6jez7qqAYpAwe+?= =?us-ascii?Q?6/c4QpkNOy5W+RcIY0H3HAAdzJbv9WD4KfaYcyBI83aGBNz8rhxH+FOX4kLs?= =?us-ascii?Q?Pu93AiFAGHiN34xZP4+OhY83DmKRCRom9UP4gkxhswI3ObSjbgFA4FaDF3cD?= =?us-ascii?Q?rgLqDe/Nkx7oY1EcQXkzqBLRlo9GnrAi2jlodZV2ox0w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r03QvpP5PnUnXchv3E7WlI34o3AVMXQ9HZjSx2CKrPHknCkt1rvMQwkkB/dp4gGUetRqOHlL7wxcUDZR6tYYFbt452Pws3mDsYJ82i637DBRfjWXX18Oj/fgCUMFMkqEemRtmTBk2T0jNh7ak9PJZfvZw==; 5:mYZllDnBOdYCaSWkieR9BkOtjLXhQu9W5U1vwGvTjAj+4Y3xzDw01NMMW4D6TNz+r4/7jMToy6wsv2hJCiseQ8eo7ZcUNurUN/ukkhjkZNe5cf1nyNKRncIxqMin379BSnAkvkg8kXC/Du5GE0t1P/q/TeeGSwQPrl447Vjcm1I=; 7:rTGUZjBWb01c1qBfpnDEjim94uEl6eeBYqiiC3Dpw04Y3DgeFjyV2da4qLS1jJ4a9Dx8zHFadFbQtHd8ttoCz4gCsMm8gNd0C2n7CbzmheDItyBTYUiL5zYOPuE/MquOxDXK+9uTbKVpUzNc0sb9yjcHONs3uAgw6frdIKtnWIWVBUX+ysdUcJVQFjXXSl9Mx+mSeKKn+wPd0ZhsNGuh+nssroUgg/pMfrJfb5F0RFSBdQhK597HqJal8rQYhJqj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2018 17:08:41.9168 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 420e509c-8cf6-48f1-1cd3-08d634533171 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3440 Subject: [dpdk-dev] [PATCH v5 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: Wed, 17 Oct 2018 17:08:47 -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 v4: * 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 | 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(+) -- 1.8.3.1