From patchwork Sun Jan 20 06:50:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 1028104 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="q0aJZSIk"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43j51h0YtBz9sBn for ; Sun, 20 Jan 2019 17:51:20 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730280AbfATGvS (ORCPT ); Sun, 20 Jan 2019 01:51:18 -0500 Received: from mail-eopbgr50082.outbound.protection.outlook.com ([40.107.5.82]:29856 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729748AbfATGvP (ORCPT ); Sun, 20 Jan 2019 01:51:15 -0500 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=10w1mKUzcScxBl7w3g3qj/88qixxXY8N5QZFuLZCeww=; b=q0aJZSIkUOSJd+xZgve+TIEY9iyLyMrXtMtN8HIyvtrz8m5U0gIqhnH3vSktFdBa6Gpv4f+TIYwO2Fs57HzHwIEi+tfj+zUdE6RPZm/a6MlFmH+3Y4on3p29PlyflOd/5PdiB3eunBWi6NMM+3zObPcCSblAAAxViMKJrriffKA= Received: from AM6PR05MB6056.eurprd05.prod.outlook.com (20.179.2.148) by AM6PR05MB4408.eurprd05.prod.outlook.com (52.135.162.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1537.26; Sun, 20 Jan 2019 06:50:56 +0000 Received: from AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::3411:612a:f48b:a5e2]) by AM6PR05MB6056.eurprd05.prod.outlook.com ([fe80::3411:612a:f48b:a5e2%5]) with mapi id 15.20.1537.031; Sun, 20 Jan 2019 06:50:56 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , Nir Dotan , mlxsw , Ido Schimmel Subject: [PATCH net-next 16/18] selftests: forwarding: Add IP-in-IP GRE hierarchical topology test Thread-Topic: [PATCH net-next 16/18] selftests: forwarding: Add IP-in-IP GRE hierarchical topology test Thread-Index: AQHUsIx+QnT3AJte1ESFeAbRHAZoiA== Date: Sun, 20 Jan 2019 06:50:56 +0000 Message-ID: <20190120065007.21352-17-idosch@mellanox.com> References: <20190120065007.21352-1-idosch@mellanox.com> In-Reply-To: <20190120065007.21352-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P192CA0103.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::44) To AM6PR05MB6056.eurprd05.prod.outlook.com (2603:10a6:20b:ab::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR05MB4408; 6:5iRmcCzGVbtqbhGJMZsE4c2g2Kl03VKJQUsZpZEBovnmbkQXWxvxK36M0D/wk1s8dLHBTEVg+NPoQ0qH5u2RSmK8EaXR6lJC927dPNdA7Epbbw849liGbgeCs4wx1iSZ5dpON0tNpnNm8u9uN1RrCOxiW6+Y+yZoU8c8+/+Z799jHdKbIfTaW6oQuQTjm/XBJIra4kwKvRdXcCJR3ahAYaXsEtc4ktaVUWg9tO/M9La1N39ye+BwLALT4R0UytmqZTFfiq+uulqLaF4ECDD0kX06pZF0OxUziVVcPSgzn4TC+RIealXGJRl5JiyvkiGqnwMqbFr0gU1XLj5mYqqwbZK3ikOYhtuj684otrfI295R9W4S2rammOuks0lFmx2XmeaQZJ+m0mHA2GrHy/vnnhsuehYTRDrAdCsgkBpIsmF8ke1qEStzpCz2lYjjWReQRr0pZhebcXallD0ZQvxZCg==; 5:g3EiosXvSBs/TmCcPmxTmcKuhywC1tNgh4vJR67DIEx7cVreeqAUuSqvQybk5ZiiNfcqQEqst+u2Tgqw2n9/42dOBqTD/dLn/5yzHFK7KCTwKmdZ9/wpnkL+UUuB7QwgyLqTNfXNzmMl/cZlo6dxjmXH/blnBis88mFQadcsjrn/oMHd/H7XgLdSUMy4hloyA0ZbRUT8TAGbznAmB6pfmg==; 7:yorXPKIvinW45jj/NlRapthVpJBWSCv0I0WWfAIuTnk2I+iqimjppRplpVoBuL95DRsTuTpBAi5JzeD+X4dbSRVBDStxFbTBgET9wWoyZeHYYLP76+TAaauvZQentPTYkmS0LDdKhHr9l+KIX7i7Tg== x-ms-office365-filtering-correlation-id: 68bb60e8-9518-4c9f-2059-08d67ea3a0e6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600109)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4408; x-ms-traffictypediagnostic: AM6PR05MB4408: x-microsoft-antispam-prvs: x-forefront-prvs: 0923977CCA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(376002)(366004)(136003)(346002)(199004)(189003)(8936002)(66066001)(2351001)(106356001)(105586002)(7736002)(81166006)(1730700003)(81156014)(305945005)(8676002)(316002)(54906003)(6116002)(6512007)(3846002)(99286004)(14454004)(478600001)(1076003)(486006)(53936002)(4326008)(107886003)(71190400001)(256004)(14444005)(25786009)(71200400001)(68736007)(102836004)(36756003)(186003)(26005)(6916009)(476003)(2616005)(50226002)(11346002)(446003)(6486002)(6436002)(5640700003)(386003)(6506007)(2906002)(52116002)(76176011)(2501003)(97736004)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4408; H:AM6PR05MB6056.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) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: bwjHGCtg3gITpz26CI3/GuDntglekrje6Tj/FZFGviuhM62IeECqS9BHwVpjkbZFI4OKGcHpM9yUlHaazuWFN5IIj4/xOwqr584yz7tyn/fil1DY/DicdWM0wZSZCzck8TCmuWfGrYoFalo2dilYWozxMB24MG3vOiadBwxnBgZehQpzj/iD0PyXMO2JDD/NTZ1D2nHG1AuFst1eEY3vFib/5eonKKjRFN+0P4G4E8Py1NdUq7oge5eKkZhMywHtiEhBFyZEjBjk+aQhnumBq4K7zpf/N1ZKGhl3ZYvqTtXdmhHEX7RYYjq87CtUNRF2xnDTG9J6myeIdID/Z+SOUnGL3YnedHp+S3inTkfPaeuwQ5OYSfkhQndpWBUDys3VLQUb5+loGnhRsKw3PRiAgT+BBzH4H6JhZDZCDFZYBbo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68bb60e8-9518-4c9f-2059-08d67ea3a0e6 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2019 06:50:55.8552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Nir Dotan Add a test that checks IP-in-IP GRE tunneling and MTU change of tunnel, based on hierarchical topology described in file ipip_lib.sh. Signed-off-by: Nir Dotan Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/ipip_hier_gre.sh | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/ipip_hier_gre.sh diff --git a/tools/testing/selftests/net/forwarding/ipip_hier_gre.sh b/tools/testing/selftests/net/forwarding/ipip_hier_gre.sh new file mode 100755 index 000000000000..05c5b3cf2f78 --- /dev/null +++ b/tools/testing/selftests/net/forwarding/ipip_hier_gre.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +# Test IP-in-IP GRE tunnels without key. +# This test uses hierarchical topology for IP tunneling tests. See +# ipip_lib.sh for more details. + +ALL_TESTS="gre_hier4 gre_mtu_change" + +NUM_NETIFS=6 +source lib.sh +source ipip_lib.sh + +setup_prepare() +{ + h1=${NETIFS[p1]} + ol1=${NETIFS[p2]} + + ul1=${NETIFS[p3]} + ul2=${NETIFS[p4]} + + ol2=${NETIFS[p5]} + h2=${NETIFS[p6]} + + forwarding_enable + vrf_prepare + h1_create + h2_create + sw1_hierarchical_create gre $ol1 $ul1 + sw2_hierarchical_create gre $ol2 $ul2 +} + +gre_hier4() +{ + RET=0 + + ping_test $h1 192.0.2.18 " gre hierarchical" +} + +gre_mtu_change() +{ + test_mtu_change gre +} + +cleanup() +{ + pre_cleanup + + sw2_hierarchical_destroy $ol2 $ul2 + sw1_hierarchical_destroy $ol1 $ul1 + h2_destroy + h1_destroy + vrf_cleanup + forwarding_restore +} + +trap cleanup EXIT + +setup_prepare +setup_wait +tests_run + +exit $EXIT_STATUS