public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>,
	<petrm@nvidia.com>, <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>, <netdev@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: add cleanup for SIGTERM sent by timeout
Date: Tue, 1 Aug 2023 13:08:06 +0200	[thread overview]
Message-ID: <875y5zf27p.fsf@nvidia.com> (raw)
In-Reply-To: <ZMYXABUN9OzfN5D3@shredder>


Ido Schimmel <idosch@idosch.org> writes:

> On Thu, Jul 27, 2023 at 09:26:03PM +0200, Mirsad Todorovac wrote:
>> not ok 49 selftests: net/forwarding: mirror_gre_changes.sh # exit=1
>
> Petr, please take a look. Probably need to make the filters more
> specific. The failure is:
>
> # TEST: mirror to gretap: TTL change (skip_hw)                        [FAIL]
> # 	Expected to capture 10 packets, got 14.

Yeah, this reproduces easily on my laptop. The switches are somehow much
more quiet and do not really hit the issue.

Mirsad, can you please try this patch? It fixes the issue for me.

From 77461c209eb0067dca7fdf4431a907b2a1ce8c6a Mon Sep 17 00:00:00 2001
Message-ID: <77461c209eb0067dca7fdf4431a907b2a1ce8c6a.1690887929.git.petrm@nvidia.com>
From: Petr Machata <petrm@nvidia.com>
Date: Tue, 1 Aug 2023 12:57:53 +0200
Subject: [PATCH net-next] selftests: mirror_gre_changes: Tighten up the TTL
 test match
To: <netdev@vger.kernel.org>

This test verifies whether the encapsulated packets have the correct
configured TTL. It does so by sending ICMP packets through the test
topology and mirroring them to a gretap netdevice. On a busy host
however, more than just the test ICMP packets may end up flowing
through the topology, get mirrored, and counted. This leads to
potential spurious failures as the test observes much more mirrored
packets than the sent test packets, and assumes a bug.

Fix this by tightening up the mirror action match. Change it from
matchall to a flower classifier matching on ICMP packets specifically.

Signed-off-by: Petr Machata <petrm@nvidia.com>
---
 tools/testing/selftests/net/forwarding/mirror_gre_changes.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
index aff88f78e339..5ea9d63915f7 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
@@ -72,7 +72,8 @@ test_span_gre_ttl()
 
 	RET=0
 
-	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	mirror_install $swp1 ingress $tundev \
+		"prot ip flower $tcflags ip_prot icmp"
 	tc filter add dev $h3 ingress pref 77 prot $prot \
 		flower skip_hw ip_ttl 50 action pass
 
-- 
2.41.0

  parent reply	other threads:[~2023-08-01 11:14 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22  0:36 [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: add cleanup for SIGTERM sent by timeout Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 02/11] selftests: forwarding: gre_custom_multipath_hash.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 03/11] selftests: forwarding: gre_inner_v4_multipath.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 04/11] selftests: forwarding: gre_multipath_nh_res.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 05/11] selftests: forwarding: gre_multipath_nh.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 06/11] selftests: forwarding: ip6gre_custom_multipath_hash.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 07/11] selftests: forwarding: ip6gre_inner_v4_multipath.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 08/11] selftests: forwarding: no_forwarding.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 09/11] selftests: forwarding: router_mpath_nh_res.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 10/11] selftests: forwarding: router_mpath_nh.sh: " Mirsad Todorovac
2023-07-22  0:36 ` [PATCH v1 11/11] selftests: forwarding: router_multipath.sh: " Mirsad Todorovac
2023-07-23  8:25 ` [PATCH v1 01/11] selftests: forwarding: custom_multipath_hash.sh: " Ido Schimmel
2023-07-23 17:27   ` Ido Schimmel
2023-07-23 18:50     ` Mirsad Todorovac
2023-07-23 18:54   ` Mirsad Todorovac
2023-07-23 21:37     ` Mirsad Todorovac
2023-07-24 14:45       ` Ido Schimmel
2023-07-24 20:46         ` Mirsad Todorovac
2023-07-26 12:22           ` Ido Schimmel
2023-07-26 16:57             ` Ido Schimmel
2023-07-27  3:48               ` Mirsad Todorovac
2023-07-27 19:26             ` Mirsad Todorovac
2023-07-30  7:53               ` Ido Schimmel
2023-07-30 16:48                 ` Mirsad Todorovac
2023-07-31  7:54                   ` Ido Schimmel
2023-07-31  9:24                     ` Mirsad Todorovac
2023-07-31 12:02                       ` Ido Schimmel
2023-07-31 15:13                         ` Mirsad Todorovac
2023-07-31 15:48                           ` Ido Schimmel
2023-08-01 20:41                             ` Mirsad Todorovac
2023-07-31 15:23                         ` Mirsad Todorovac
2023-08-01 11:08                 ` Petr Machata [this message]
2023-08-01 16:54                   ` Mirsad Todorovac
2023-08-02 10:33                     ` Petr Machata
2023-08-02 11:06                       ` Mirsad Todorovac
2023-07-25  8:44 ` Petr Machata
2023-07-25 16:23   ` Mirsad Todorovac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y5zf27p.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@idosch.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox