Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1369656imm; Tue, 2 Oct 2018 07:12:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV61hNVkclM1zSHnBWOF9S8yu0pDijYVYgrsxNdctd1of99aiQjQdVE+qwCjA7hznrlHAzlX1 X-Received: by 2002:a17:902:50e3:: with SMTP id c32-v6mr17069631plj.194.1538489550994; Tue, 02 Oct 2018 07:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538489550; cv=none; d=google.com; s=arc-20160816; b=CDxRRgUIA41RU0piRusFQiAtAy154eQxS6e7r7BaYk7wSazhnrv19SKZ3zGRGZPf+V lqdaao+/y5r9aV9omvCdlbpMw2cAqrXGY8en4OI+o0mnSzgp8YfApnNED1Qm0ajTmKBo EoWF2CZ1NyQVJmuBHEOimH3Gwu7RwWLya5JSqgHIiRYbvuhKnAji8zbFqi3Ku2qtHHXD /cRIuctB6W5cWI5grmOoB933n4RzWhaQOs+18Ul1y+AWIY+qpZYzx40Lt14Wf1SqsYLc VsG/n4u72gWOo9euOAXvLYV0ZAeq+Umo2ZvlOHToLUmr9sD64SEctGNMbByth5hj939w mpQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=ei3JjlTZCeuKh8QXoXeBXYp7/CEuHHt1+/XujlQKyD8=; b=EydHY6+JkBdL0K5GuumcuDOycxmSan99oYNZPL3U7g1FREXIr9o3LAtZ1kDjTHtRjV JqgpTNgzz5sK9ewdOubDoq31MXt+4sFsFg8pCXgKPHRM3PevR5+TF3x9d1uqbuk940oo iRlEj8zb6yfp3UaeEiN8VC9WGAOY9UoRAsHdflL2FgzV/C4utaEkjs7WUXsEQC62STiF Gkf/lUuyXXASL/8h0etHFFG/IPH4XBjSqYrSnRiGgmgDhpV02e8JXdk05Z2huzIxOYbT MP/XWwHf3iPBIKNorZJTIM/Cg2PbFPrQd2W6tnZ5atgUGu3Qd7yhP0A2Ev7KRkBCX4JT 3VDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6-v6si3438338pfb.161.2018.10.02.07.12.16; Tue, 02 Oct 2018 07:12:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728675AbeJBUK5 (ORCPT + 99 others); Tue, 2 Oct 2018 16:10:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60390 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727485AbeJBUK5 (ORCPT ); Tue, 2 Oct 2018 16:10:57 -0400 Received: from localhost (24-104-73-23-ip-static.hfc.comcastbusiness.net [24.104.73.23]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8923DBF0; Tue, 2 Oct 2018 13:27:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Machata , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 066/228] selftests: forwarding: Tweak tc filters for mirror-to-gretap tests Date: Tue, 2 Oct 2018 06:22:43 -0700 Message-Id: <20181002132503.761221651@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181002132459.032960735@linuxfoundation.org> References: <20181002132459.032960735@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Machata [ Upstream commit ec9fdc99f5a6a2cfe4061e807fcb0cc1129f0a2d ] When running mirror_gre_bridge_1d_vlan tests on veth, several issues cause spurious failures: - vlan_ethtype should be ip, not ipv6 even in mirror-to-ip6gretap case, because the overlay packet is still IPv4. - Similarly ip_proto matches the innermost IP protocol, so can't be used to filter out GRE packet. Drop the corresponding condition. - Because the above fixes the filters to match in slow path as well, they need to be made skip_hw so as not to double-count packets. Signed-off-by: Petr Machata Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh | 6 ++++-- tools/testing/selftests/net/forwarding/mirror_gre_lib.sh | 2 +- tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh @@ -74,12 +74,14 @@ test_vlan_match() test_gretap() { - test_vlan_match gt4 'vlan_id 555 vlan_ethtype ip' "mirror to gretap" + test_vlan_match gt4 'skip_hw vlan_id 555 vlan_ethtype ip' \ + "mirror to gretap" } test_ip6gretap() { - test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap" + test_vlan_match gt6 'skip_hw vlan_id 555 vlan_ethtype ip' \ + "mirror to ip6gretap" } test_gretap_stp() --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -62,7 +62,7 @@ full_test_span_gre_dir_vlan_ips() "$backward_type" "$ip1" "$ip2" tc filter add dev $h3 ingress pref 77 prot 802.1q \ - flower $vlan_match ip_proto 0x2f \ + flower $vlan_match \ action pass mirror_test v$h1 $ip1 $ip2 $h3 77 10 tc filter del dev $h3 ingress pref 77 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh @@ -79,12 +79,14 @@ test_vlan_match() test_gretap() { - test_vlan_match gt4 'vlan_id 555 vlan_ethtype ip' "mirror to gretap" + test_vlan_match gt4 'skip_hw vlan_id 555 vlan_ethtype ip' \ + "mirror to gretap" } test_ip6gretap() { - test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap" + test_vlan_match gt6 'skip_hw vlan_id 555 vlan_ethtype ip' \ + "mirror to ip6gretap" } test_span_gre_forbidden_cpu()