From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50040.outbound.protection.outlook.com [40.107.5.40]) by dpdk.org (Postfix) with ESMTP id 756401B450 for ; Mon, 22 Oct 2018 19:38:49 +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=y7rkkpvfOZGpFecZOYeeYFDFZzuU2JjBKfBbwhPSiQI=; b=MFUOBI53gDezhCgxg6Soxk2pP78ZreCphFC0ehZJnN0Zrpc+1ECIbQRo7NybCemGiRlH4imnFYeyPwYBkky/PADeRsktA0CkhHvs1lnr7EpcXPAjLPLlA92KJ8YmrideY3u7y1gtz3PMneVs+Yv86j/j1/zrqIQQG3jY3kACIxc= 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:45 +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:11 +0000 Message-Id: <1540229891-112870-4-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1540229891-112870-1-git-send-email-orika@mellanox.com> References: <1539796072-111646-1-git-send-email-orika@mellanox.com> <1540229891-112870-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: 3d29fa85-a56f-4cad-2569-08d638453891 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:6TMYURB7g/FYJZjRcAdytzHh8ON04IRycjqfwRgNOFEsVIw0BvNA4QdZ2zjW9AAIJ2Kfjn1gzkvgB9sOKQ/vgFUmXT7hI2vC2cF8Q+EjO7Hr/p0c4qyPQNE4iAp0hlh7bz4zkFgnW8bru1hnV6GxfvJByGfAgNhpN+w9m9AEWqL9x5Q32ba3yWMmt01l80V3Hfa0qQ7x3p+bBlBmzQh2//IOX6o8XDpyQZMm4pPuVOGHNsp8mI1wehNDKuQkqjfL; 25:MXyVt7PNpAa/bm/mkhI/7s+dxPFltdqKeDDoL81QuNEYqg0TEWrFVYXTZmrfjfAL3y3M7wgsMx59tUUwewUVBYiDqoovk+wd+X6B4lpikYDRrjfRxBmoSQyzBhhC/ZE6Y9hXPmhNcna32g92u785r+I+X0pF5UHijR8+oIWsY/Tgo+sHdigf1CbMWfjmOq80P5juY6tkh7b+SHL/iBmd3tn/6vN+tHi802ukUGj//SUnEHazb6qhEw+8FIMR+Ryfc6SOH7j4OHRxuNR46euoCeecjENmLbB0dnFu2RB23RKmKFJXfRc94w1Amdczwfln98M6M4+B2XgkJUx5UUSfCg==; 31:kFhQ2hR1y5vgt0/oOwX2A6YijH2qvBw8vWc7vmCS2/5ZEF5ulkFgTtHsLGreCaitVvLr91AC+2my/3ORBUwZNxsB3KnAOdrQWKMeudaf2EKQYSXwhoG8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-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); 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)(4744004)(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); 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:WXqSO7qf18w9gnPr3x5tR7bDAZYvyLbpeuk8NGx0e?= =?us-ascii?Q?QmdBcXi9HC15kQtDpRa4iTSnZsVLrBLCpzTEVY1ev0qz5t+6nmQ909VdxyQ+?= =?us-ascii?Q?IAb+e93eNvtfE8A4miV8atHImwXw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uhGNrJXozckICVT78WCNZ3fliSGYucyDqDwZeH8naxvIjWWzPfqhW9xc6A/rl3XQ9eSQ185o/V7oKk+wTnWxyxTOjnF0SOe0Q+QxozTqvHOZwyv9IHikrefmCAH0ZyN2rTDYnM4IpNjJU7H1wBvEs/QomTannPuB0k2o8PudsRauYJY70eashm0c5SoDG7bUFXqUD8+Rxtg/SHv6mp7nJ7FEfjvpRASXK+/0ZA==; 5:MBSHeVEzi8jURBaLHIgBUNSc/mLsataMyh59WnG9MSHyk2+IMJ2PtbiCS87Ne3rs8cn1Lw6oyscHmfaIiVj4HlcnpIROsu7FQoCofTpJb4JXlicmxR2ncho/Bz9u+DR+v83GMMfyC4boE1BbAbflozP4WtLb35EzLtVD7O93+JY=; 7:vbbAGAfEHbP+K5DtPXXcCTWwC7vXxeW76RxCQOIs8kZw2wAbBC67w9bKxTB3AoowvieSPMABtg/Z87WCyYtlZpZNUlGb+3wERGRjrhSFoTzOyPRPwdwQbk7qefgnCwwg4cEok7bi7rDUNtQUAgJTouyoFO/bEArqHbZCtQqKrzjHWVfmT/nnImZ0smIAnilcMqzJL1qcQ8Ca2J4YWxoeKKCi/dnQrRJ+apVCoYScCgMOlj+jhL1ZdxoF9/Cy8iar SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2018 17:38:45.8769 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d29fa85-a56f-4cad-2569-08d638453891 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 3/3] app/testpmd: add MPLSoGRE 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:49 -0000 Example for MPLSoGRE tunnel: ETH / IPV4 / GRE / MPLS / IP / L4..L7 In order to encapsulate such a tunnel there is a need to remove L2 of the inner packet and encap the remaining tunnel, this is done by applying 2 rte flow commands l2_decap followed by mplsogre_encap. Both commands must appear in the same flow, and from the point of the packet it both actions are applyed at the same time. (There is no part where a packet doesn't have L2 header). Decapsulating such a tunnel works the other way, first we need to decap the outer tunnel header and then apply the new L2. So the commands will be mplsogre_decap / l2_encap Due to the complex encapsulation of MPLSoGRE flow action and based on the fact testpmd does not allocate memory, this patch adds a new command in testpmd to initialise a global structure containing the necessary information to make the outer layer of the packet. This same global structures will then be used by the flow commands in testpmd when the action mplsogre_encap, mplsogre_decap, will be parsed, at this point, the conversion into such action becomes trivial. Signed-off-by: Ori Kam --- v6: * fix compilation issue. --- app/test-pmd/cmdline.c | 227 ++++++++++++++++++++++++++ app/test-pmd/cmdline_flow.c | 239 ++++++++++++++++++++++++++-- app/test-pmd/testpmd.h | 22 +++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 103 ++++++++++++ 4 files changed, 580 insertions(+), 11 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index e807dbb..6e14345 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -15436,6 +15436,229 @@ static void cmd_set_l2_decap_parsed(void *parsed_result, }, }; +/** Set MPLSoGRE encapsulation details */ +struct cmd_set_mplsogre_encap_result { + cmdline_fixed_string_t set; + cmdline_fixed_string_t mplsogre; + cmdline_fixed_string_t pos_token; + cmdline_fixed_string_t ip_version; + uint32_t vlan_present:1; + uint32_t label; + cmdline_ipaddr_t ip_src; + cmdline_ipaddr_t ip_dst; + uint16_t tci; + struct ether_addr eth_src; + struct ether_addr eth_dst; +}; + +cmdline_parse_token_string_t cmd_set_mplsogre_encap_set = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, set, + "set"); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_mplsogre_encap = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, mplsogre, + "mplsogre_encap"); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_mplsogre_encap_with_vlan = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + mplsogre, "mplsogre_encap-with-vlan"); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_version = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "ip-version"); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_version_value = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + ip_version, "ipv4#ipv6"); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_label = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "label"); +cmdline_parse_token_num_t cmd_set_mplsogre_encap_label_value = + TOKEN_NUM_INITIALIZER(struct cmd_set_mplsogre_encap_result, label, + UINT32); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_src = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "ip-src"); +cmdline_parse_token_ipaddr_t cmd_set_mplsogre_encap_ip_src_value = + TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, ip_src); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_ip_dst = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "ip-dst"); +cmdline_parse_token_ipaddr_t cmd_set_mplsogre_encap_ip_dst_value = + TOKEN_IPADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, ip_dst); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_vlan = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "vlan-tci"); +cmdline_parse_token_num_t cmd_set_mplsogre_encap_vlan_value = + TOKEN_NUM_INITIALIZER(struct cmd_set_mplsogre_encap_result, tci, + UINT16); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_eth_src = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "eth-src"); +cmdline_parse_token_etheraddr_t cmd_set_mplsogre_encap_eth_src_value = + TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, + eth_src); +cmdline_parse_token_string_t cmd_set_mplsogre_encap_eth_dst = + TOKEN_STRING_INITIALIZER(struct cmd_set_mplsogre_encap_result, + pos_token, "eth-dst"); +cmdline_parse_token_etheraddr_t cmd_set_mplsogre_encap_eth_dst_value = + TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_mplsogre_encap_result, + eth_dst); + +static void cmd_set_mplsogre_encap_parsed(void *parsed_result, + __attribute__((unused)) struct cmdline *cl, + __attribute__((unused)) void *data) +{ + struct cmd_set_mplsogre_encap_result *res = parsed_result; + union { + uint32_t mplsogre_label; + uint8_t label[3]; + } id = { + .mplsogre_label = + rte_cpu_to_be_32(res->label) & RTE_BE32(0x00ffffff), + }; + + if (strcmp(res->mplsogre, "mplsogre_encap") == 0) + mplsogre_encap_conf.select_vlan = 0; + else if (strcmp(res->mplsogre, "mplsogre_encap-with-vlan") == 0) + mplsogre_encap_conf.select_vlan = 1; + if (strcmp(res->ip_version, "ipv4") == 0) + mplsogre_encap_conf.select_ipv4 = 1; + else if (strcmp(res->ip_version, "ipv6") == 0) + mplsogre_encap_conf.select_ipv4 = 0; + else + return; + rte_memcpy(mplsogre_encap_conf.label, &id.label[1], 3); + if (mplsogre_encap_conf.select_ipv4) { + IPV4_ADDR_TO_UINT(res->ip_src, mplsogre_encap_conf.ipv4_src); + IPV4_ADDR_TO_UINT(res->ip_dst, mplsogre_encap_conf.ipv4_dst); + } else { + IPV6_ADDR_TO_ARRAY(res->ip_src, mplsogre_encap_conf.ipv6_src); + IPV6_ADDR_TO_ARRAY(res->ip_dst, mplsogre_encap_conf.ipv6_dst); + } + if (mplsogre_encap_conf.select_vlan) + mplsogre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci); + rte_memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes, + ETHER_ADDR_LEN); + rte_memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes, + ETHER_ADDR_LEN); +} + +cmdline_parse_inst_t cmd_set_mplsogre_encap = { + .f = cmd_set_mplsogre_encap_parsed, + .data = NULL, + .help_str = "set mplsogre_encap ip-version ipv4|ipv6 label