From: Jiri Pirko <jiri@nvidia.com>
To: Ido Schimmel <idosch@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com, amcohen@nvidia.com,
dsahern@gmail.com, ivecera@redhat.com, mlxsw@nvidia.com
Subject: Re: [PATCH net] selftests: forwarding: Fix failing tests with old libnet
Date: Tue, 9 Aug 2022 15:10:02 +0200 [thread overview]
Message-ID: <YvJcql9M0CHJ6qGP@nanopsycho> (raw)
In-Reply-To: <20220809113320.751413-1-idosch@nvidia.com>
Tue, Aug 09, 2022 at 01:33:20PM CEST, idosch@nvidia.com wrote:
>The custom multipath hash tests use mausezahn in order to test how
>changes in various packet fields affect the packet distribution across
>the available nexthops.
>
>The tool uses the libnet library for various low-level packet
>construction and injection. The library started using the
>"SO_BINDTODEVICE" socket option for IPv6 sockets in version 1.1.6 and
>for IPv4 sockets in version 1.2.
>
>When the option is not set, packets are not routed according to the
>table associated with the VRF master device and tests fail.
>
>Fix this by prefixing the command with "ip vrf exec", which will cause
>the route lookup to occur in the VRF routing table. This makes the tests
>pass regardless of the libnet library version.
>
>Fixes: 511e8db54036 ("selftests: forwarding: Add test for custom multipath hash")
>Fixes: 185b0c190bb6 ("selftests: forwarding: Add test for custom multipath hash with IPv4 GRE")
>Fixes: b7715acba4d3 ("selftests: forwarding: Add test for custom multipath hash with IPv6 GRE")
>Reported-by: Ivan Vecera <ivecera@redhat.com>
>Tested-by: Ivan Vecera <ivecera@redhat.com>
>Signed-off-by: Ido Schimmel <idosch@nvidia.com>
>Reviewed-by: Amit Cohen <amcohen@nvidia.com>
>---
> .../net/forwarding/custom_multipath_hash.sh | 24 ++++++++++++-------
> .../forwarding/gre_custom_multipath_hash.sh | 24 ++++++++++++-------
> .../ip6gre_custom_multipath_hash.sh | 24 ++++++++++++-------
> 3 files changed, 48 insertions(+), 24 deletions(-)
>
>diff --git a/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh b/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh
>index a15d21dc035a..56eb83d1a3bd 100755
>--- a/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh
>+++ b/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh
>@@ -181,37 +181,43 @@ ping_ipv6()
>
> send_src_ipv4()
> {
>- $MZ $h1 -q -p 64 -A "198.51.100.2-198.51.100.253" -B 203.0.113.2 \
>+ ip vrf exec v$h1 $MZ $h1 -q -p 64 \
Not directly related to this, but I was wondering, if it would be
possible to use $IP and allow user to replace the system-wide "ip" for
testing purposes...
next prev parent reply other threads:[~2022-08-09 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 11:33 [PATCH net] selftests: forwarding: Fix failing tests with old libnet Ido Schimmel
2022-08-09 13:10 ` Jiri Pirko [this message]
2022-08-09 14:21 ` Petr Machata
2022-08-09 14:27 ` Ido Schimmel
2022-08-11 5:40 ` patchwork-bot+netdevbpf
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=YvJcql9M0CHJ6qGP@nanopsycho \
--to=jiri@nvidia.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=ivecera@redhat.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).