From patchwork Tue May 1 14:39:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10374053 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 66950601C7 for ; Tue, 1 May 2018 14:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5224928846 for ; Tue, 1 May 2018 14:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 439622885C; Tue, 1 May 2018 14:40:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D2BD328846 for ; Tue, 1 May 2018 14:39:59 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40b3wF0yfYzF2Qt for ; Wed, 2 May 2018 00:39:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="JphEqugo"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.3.85; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="JphEqugo"; dkim-atps=neutral Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30085.outbound.protection.outlook.com [40.107.3.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40b3w65GdCzF2Qt for ; Wed, 2 May 2018 00:39:49 +1000 (AEST) 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; bh=pSWx+ogLsTnIGhvRFGIDfPpMlJI2Rziqt8qVlkiv9HU=; b=JphEqugoZD3hvcXUNRTo29NaWGDSPZTi+SvwRICNkCPzFm0cZn442L/tIcHKSlmFc3XplvZGKKgvK2nvLZOTKAT5Q9zibZQaAFlFsPdfUsZ1VdwSSgSk/OHYrMaGd0Ymw2xz6BJhl0ssawJsZrA1bfuBMDaB7jx6LgdXPtNzkZU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by DB7PR05MB4186.eurprd05.prod.outlook.com (2603:10a6:5:18::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.23; Tue, 1 May 2018 14:39:28 +0000 From: Petr Machata To: , Subject: [PATCH net-next mlxsw] selftests: forwarding: mirror-to-GRE: Allow testlist override Message-Id: Date: Tue, 01 May 2018 16:39:21 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: HE1PR0301CA0004.eurprd03.prod.outlook.com (2603:10a6:3:76::14) To DB7PR05MB4186.eurprd05.prod.outlook.com (2603:10a6:5:18::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4186; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4186; 3:XBeWz/eWzGcTSnW/aOVD+/rcHfm+TnWuhYuG1a3VEqaYZ584jHzBIAfrXiyjDZP1Bu8KlBxtn+HuDI/JwJRACO/Z05fcre+jvK1Q78xAQElhASL+WzKtnVzmIaoBChK8AQnuoDSSEyYW5ldEEThEz1vp6Kpb8A8rpbqla7p3xNPix6C21hANccBdYDFfjI0R54BiImZyVBWgNQ9BDQ2RYmSrkZ7T7HABF8VR5w62+K3zmEgFCUUlXhMmL4mEeK5F; 25:bLFpZ8vJ24+mnoCU11ajstcEM5fDlGu84hkxVi/JZmS6unJLd8jGTNZHcUV64U4Mszzi0pkSTlE/9unEBF0k1kbPhJstgPLrHC6wcviLFkbp3vvB5RpyUD6D4bFUtTTKp0Bji3sxOJIAylmeKh+762kOi8fWb4jzXozVVJ6nqAxYp5qg16AM0aE8yi9LhjcXNlaGBdfubQXn7nyZdMOn0tmVaN7eR1Qi8EBYwnBXbMe5R2AonAYpPMu5iaHyZkpWVP2UQnTlub7qGRFY7hLBCtBe/JcmztpYlAai38IvZhtvc2WeuvVuhSD9wPq8/wjRCabCDrwZz61C0XE2jh7k8w==; 31:pC7Ma/VobXptNbHQ6FszNjHVuD/1/9uCtzhd3y+duTXa3nSd0TLszDJpPfJSbluEN0ouK5CV6uzKJG8NO4uNOaX8pjOjuL+WZO2U2FhoWdwnEIWt/N+Gc3cbGODNQB5jGiXuU7fHG6dVTfrvM6tvFzgAVmO2D+NfinlrZTdu1lRQPh40/pxauQhm8KK77SR/YCeSadBaOjt1Nc/IunjOjG/PXxPIIaQQHF/cOykSPzM= X-MS-TrafficTypeDiagnostic: DB7PR05MB4186: X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4186; 20:0ubvZ8OF0sR8vG22/sNcxhObPZYOk6S/X5LECbqU98hgTQzSajgvXCqDJEtAvura6Gaiw7yizxXwuGvF2KIlfnTMI6NIkWCnZy4CgbviGdmgE0XMvnOAbtezIkg3ZYcWQ2WcUk14mmK6BaPbQKEBJd7I9kF0APN6sWB4VVTeLdQuyq+ONtCU/IHmCxXFM4AgGq+leYOrupX7/mDDHrgaSb4BqZ7XZ1Ph7LbhEqkns81XGLhQNve+7MTBnU4+5/G3nrV/T105QxqS7Jx/wzt40b+dKM4tCxcGMcDPcRuEzqVqjQWglRKE3lkYcxRTuI35FQL8z6bxdRQaAzkDUMMo29blIz8Zb7MGJkvuwPDIjiGCMeIsHr1Y0pIcJA6WwpfGdpefsRDaMrXy0E3BWOEGMIX37CiTWn2Zgvp9qGYLCgR4HfrQweqDuOENBMHBDRjAC2/7p+gqm7sRTP9Q7HJJUyj0WtLj3g8kVavhKZo6e/qlEhtx8nxaC6KtHYNMmqLM; 4:hLat1yt8J9VIUzibtVzQhovlftrLIc04veb2Qos644QCLX2ymRfO4qJJtEKHVKJq3YVfbXRtIog6svjVi1MCTPzsrpfcaf/DNhOBfU2e2qg9wmcghufnJIV4dR+Jte3Q1LlPeFg+SmrShsnwrN7JNDitqKKuWDUgQWTYENqPxc4bOmC0stTNo6sYFkeiDCR0v2EmcCPE2aTV9tWLugyVDhkbnm8b4gQEkf3aegyIa1yZp2U/kcBccy5O/zRPytCA6vndpdCpM1NoBbAoN0il8w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DB7PR05MB4186; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4186; X-Forefront-PRVS: 06592CCE58 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(346002)(366004)(376002)(189003)(199004)(5660300001)(97736004)(36756003)(58126008)(50466002)(16526019)(2906002)(575784001)(86362001)(478600001)(476003)(316002)(54906003)(6666003)(16586007)(6116002)(3846002)(53936002)(6486002)(68736007)(486006)(110136005)(48376002)(2616005)(956004)(66066001)(305945005)(52116002)(47776003)(51416003)(25786009)(8936002)(26005)(386003)(59450400001)(105586002)(8676002)(118296001)(5890100001)(107886003)(81166006)(81156014)(7736002)(6496006)(106356001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4186; H:t540p; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR05MB4186; 23:G++FW/F518dkCaeFcuIGeNlmBMuINBbtoRzsR37NK?= =?us-ascii?Q?9p8ViUA5If0wAHQAV5h/4ZfgPrHL7jh+bWTN4gdergU6i2tk2voYsyzCBz6K?= =?us-ascii?Q?3FTF3TXR2KpACTVtkjDF7VbEwkRN4MJvujhuwCJJrcAw7dGnfnz7aw+IsNZs?= =?us-ascii?Q?ZXI4uvenHjEmIRyIwXXFeFJN9nYKsJoPaZitXDYK6aZAUHQSHXWiN0i3gNyu?= =?us-ascii?Q?sTtIbVP2XO2MEvUR9owqTsl5SEt+rctXb9YS7IUkghGjpEpfpScw7YRC2U/x?= =?us-ascii?Q?TU1KNyqSBK0gif3GNmn2KJ2ARAj7pz/kFlV0Uu182C7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Lag4QvNJdhTOg9M8XLJ4XUw70waPY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4186; 7:NKiXaHNIJAK2IYzwOShSK5vjWkPN394CYd8M6/yI3s5R/HSXS9jAhDjxIYDTOKuIOMa9Xxsllpsz62ytXe8QXKvr/QtadIVWHa/Jr5fr/nzhO24n113j9XDWIkgIgLdh1+KwWh7pya8Z1lejMhWoxT4VtKdaNVMo/ElKsMsPHhZYzT2IyXhxUXBIz2md8wCmelsG98jCvdYApNawAOqIaLjOqgMDgIiqBHWAW34m44Kt921rBS2Se5fNCothgMS8 X-MS-Office365-Filtering-Correlation-Id: 4fc27227-e617-4a4c-cf89-08d5af715f61 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2018 14:39:28.9358 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc27227-e617-4a4c-cf89-08d5af715f61 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4186 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-internal@mellanox.com Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Petr Machata --- .../testing/selftests/net/forwarding/mirror_gre.sh | 36 +++++++++++++++++----- .../selftests/net/forwarding/mirror_gre_bound.sh | 23 +++++++++++--- .../selftests/net/forwarding/mirror_gre_changes.sh | 29 ++++++++++++++--- .../selftests/net/forwarding/mirror_gre_flower.sh | 23 +++++++++++--- .../selftests/net/forwarding/mirror_gre_neigh.sh | 22 ++++++++++--- .../selftests/net/forwarding/mirror_gre_nh.sh | 8 +++-- 6 files changed, 114 insertions(+), 27 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre.sh b/tools/testing/selftests/net/forwarding/mirror_gre.sh index a8abc73..c6786d1 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre.sh @@ -10,6 +10,14 @@ # traffic. Test that the payload is what is expected (ICMP ping request or # reply, depending on test). +ALL_TESTS=" + test_gretap + test_ip6gretap + test_gretap_mac + test_ip6gretap_mac + test_two_spans +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -100,22 +108,36 @@ test_two_spans() log_test "two simultaneously configured mirrors ($tcflags)" } -test_all() +test_gretap() { - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - full_test_span_gre_dir gt4 ingress 8 0 "mirror to gretap" - full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap" full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap" +} + +test_ip6gretap() +{ + full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap" full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap" +} +test_gretap_mac() +{ test_span_gre_mac gt4 ingress ip "mirror to gretap" - test_span_gre_mac gt6 ingress ipv6 "mirror to ip6gretap" test_span_gre_mac gt4 egress ip "mirror to gretap" +} + +test_ip6gretap_mac() +{ + test_span_gre_mac gt6 ingress ipv6 "mirror to ip6gretap" test_span_gre_mac gt6 egress ipv6 "mirror to ip6gretap" +} - test_two_spans +test_all() +{ + slow_path_trap_install $swp1 ingress + slow_path_trap_install $swp1 egress + + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh index 3708ac0..360ca13 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh @@ -42,6 +42,11 @@ # underlay manner, i.e. with a bound dummy device that marks underlay VRF where # the encapsulated packed should be routed. +ALL_TESTS=" + test_gretap + test_ip6gretap +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -178,6 +183,18 @@ cleanup() vrf_cleanup } +test_gretap() +{ + full_test_span_gre_dir gt4 ingress 8 0 "mirror to gretap w/ UL" + full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap w/ UL" +} + +test_ip6gretap() +{ + full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap w/ UL" + full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap w/ UL" +} + test_all() { RET=0 @@ -185,11 +202,7 @@ test_all() slow_path_trap_install $swp1 ingress slow_path_trap_install $swp1 egress - full_test_span_gre_dir gt4 ingress 8 0 "mirror to gretap w/ UL" - full_test_span_gre_dir gt6 ingress 8 0 "mirror to ip6gretap w/ UL" - - full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap w/ UL" - full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap w/ UL" + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh index 0ed288a..fdb612f 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh @@ -7,6 +7,13 @@ # Test how mirrors to gretap and ip6gretap react to changes to relevant # configuration. +ALL_TESTS=" + test_ttl + test_tun_up + test_egress_up + test_remote_ip +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -155,22 +162,36 @@ test_span_gre_remote_ip() log_test "$what: remote address change ($tcflags)" } -test_all() +test_ttl() { - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - test_span_gre_ttl gt4 gretap ip "mirror to gretap" test_span_gre_ttl gt6 ip6gretap ipv6 "mirror to ip6gretap" +} +test_tun_up() +{ test_span_gre_tun_up gt4 "mirror to gretap" test_span_gre_tun_up gt6 "mirror to ip6gretap" +} +test_egress_up() +{ test_span_gre_egress_up gt4 192.0.2.130 "mirror to gretap" test_span_gre_egress_up gt6 2001:db8:2::2 "mirror to ip6gretap" +} +test_remote_ip() +{ test_span_gre_remote_ip gt4 gretap 192.0.2.130 192.0.2.132 "mirror to gretap" test_span_gre_remote_ip gt6 ip6gretap 2001:db8:2::2 2001:db8:2::4 "mirror to ip6gretap" +} + +test_all() +{ + slow_path_trap_install $swp1 ingress + slow_path_trap_install $swp1 egress + + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh index 178a42d..2e54407 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh @@ -10,6 +10,11 @@ # this address, mirroring takes place, whereas when pinging the other one, # there's no mirroring. +ALL_TESTS=" + test_gretap + test_ip6gretap +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -81,6 +86,18 @@ full_test_span_gre_dir_acl() log_test "$direction $what ($tcflags)" } +test_gretap() +{ + full_test_span_gre_dir_acl gt4 ingress 8 0 192.0.2.4 "ACL mirror to gretap" + full_test_span_gre_dir_acl gt4 egress 0 8 192.0.2.3 "ACL mirror to gretap" +} + +test_ip6gretap() +{ + full_test_span_gre_dir_acl gt6 ingress 8 0 192.0.2.4 "ACL mirror to ip6gretap" + full_test_span_gre_dir_acl gt6 egress 0 8 192.0.2.3 "ACL mirror to ip6gretap" +} + test_all() { RET=0 @@ -88,11 +105,7 @@ test_all() slow_path_trap_install $swp1 ingress slow_path_trap_install $swp1 egress - full_test_span_gre_dir_acl gt4 ingress 8 0 192.0.2.4 "ACL mirror to gretap" - full_test_span_gre_dir_acl gt6 ingress 8 0 192.0.2.4 "ACL mirror to ip6gretap" - - full_test_span_gre_dir_acl gt4 egress 0 8 192.0.2.3 "ACL mirror to gretap" - full_test_span_gre_dir_acl gt6 egress 0 8 192.0.2.3 "ACL mirror to ip6gretap" + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh index 1ca29ba..fc0508e 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh @@ -9,6 +9,11 @@ # is set up. Later on, the neighbor is deleted and it is expected to be # reinitialized using the usual ARP process, and the mirroring offload updated. +ALL_TESTS=" + test_gretap + test_ip6gretap +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -69,15 +74,24 @@ test_span_gre_neigh() log_test "$direction $what: neighbor change ($tcflags)" } -test_all() +test_gretap() { - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - test_span_gre_neigh 192.0.2.130 gt4 ingress "mirror to gretap" test_span_gre_neigh 192.0.2.130 gt4 egress "mirror to gretap" +} + +test_ip6gretap() +{ test_span_gre_neigh 2001:db8:2::2 gt6 ingress "mirror to ip6gretap" test_span_gre_neigh 2001:db8:2::2 gt6 egress "mirror to ip6gretap" +} + +test_all() +{ + slow_path_trap_install $swp1 ingress + slow_path_trap_install $swp1 egress + + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh index 9ac7097..a0d1ad4 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh @@ -7,6 +7,11 @@ # Test that gretap and ip6gretap mirroring works when the other tunnel endpoint # is reachable through a next-hop route (as opposed to directly-attached route). +ALL_TESTS=" + test_gretap + test_ip6gretap +" + NUM_NETIFS=6 source lib.sh source mirror_lib.sh @@ -92,8 +97,7 @@ test_all() slow_path_trap_install $swp1 ingress slow_path_trap_install $swp1 egress - test_gretap - test_ip6gretap + tests_run slow_path_trap_uninstall $swp1 egress slow_path_trap_uninstall $swp1 ingress