From: Petr Machata <petrm@nvidia.com>
To: Jiri Pirko <jiri@nvidia.com>
Cc: Ido Schimmel <idosch@nvidia.com>, <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 16:21:31 +0200 [thread overview]
Message-ID: <875yj17a6t.fsf@nvidia.com> (raw)
In-Reply-To: <YvJcql9M0CHJ6qGP@nanopsycho>
Jiri Pirko <jiri@nvidia.com> writes:
> Tue, Aug 09, 2022 at 01:33:20PM CEST, idosch@nvidia.com wrote:
>>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...
A typical forwarding test builds a whole topology with a number of IP
addresses and assumptions about them. E.g. routes need network address
derived from address of the remote endpoint, directly attached hosts
need addresses from the same network, flower rules etc. might match
pieces of endpoint addresses, the above code fragment actually walks a
range of IPs... So it's not just $IP. At the minimum it's a map of IPs
plus some helpers to derive the rest, and conversion of the selftests to
correctly use the helpers. Doable, sure, but I suspect a fairly messy
deal.
That's why the selftests use reserved ranges: 192.0.2.0/24,
198.51.100.0/24 etc. and 2001:db8::/32. They are not supposed to
conflict with whatever addresses the user uses.
next prev parent reply other threads:[~2022-08-09 14:39 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
2022-08-09 14:21 ` Petr Machata [this message]
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=875yj17a6t.fsf@nvidia.com \
--to=petrm@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=jiri@nvidia.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).