From: Ido Schimmel <idosch@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Petr Machata <petrm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
Jiri Pirko <jiri@resnulli.us>,
mlxsw@nvidia.com
Subject: Re: [PATCH net 2/2] selftest: forwarding: router: Add a test case for IPv4 link-local source IP
Date: Thu, 14 Aug 2025 10:35:27 +0300 [thread overview]
Message-ID: <aJ2RvybsdTpRZ27k@shredder> (raw)
In-Reply-To: <20250813134037.3c8f5a98@kernel.org>
On Wed, Aug 13, 2025 at 01:40:37PM -0700, Jakub Kicinski wrote:
> On Wed, 13 Aug 2025 13:47:09 +0200 Petr Machata wrote:
> > From: Ido Schimmel <idosch@nvidia.com>
> >
> > Add a test case which checks that packets with an IPv4 link-local source
> > IP are forwarded and not dropped.
>
> The new test case doesn't pass for us:
>
> # 22.73 [+2.13] TEST: IPv4 source IP is link-local [FAIL]
> # 22.74 [+0.01] Packets were dropped
> not ok 1 selftests: net/forwarding: router.sh # exit=1
>
> https://netdev-3.bots.linux.dev/vmksft-forwarding-dbg/results/251622/97-router-sh/stdout
>
> LMK if this is an infra problem, I'll hide the series for now:
> pw-bot: cr
Seems that we need to disable rp_filter to prevent packets from getting
dropped on ingress. Can you test the following diff or should we just
post a v2?
diff --git a/tools/testing/selftests/net/forwarding/router.sh b/tools/testing/selftests/net/forwarding/router.sh
index 50d362ced430..b409680bec1d 100755
--- a/tools/testing/selftests/net/forwarding/router.sh
+++ b/tools/testing/selftests/net/forwarding/router.sh
@@ -337,6 +337,10 @@ ipv4_sip_link_local()
RET=0
+ # Disable rpfilter to prevent packets to be dropped because of it.
+ sysctl_set net.ipv4.conf.all.rp_filter 0
+ sysctl_set net.ipv4.conf."$rp1".rp_filter 0
+
tc filter add dev "$rp2" egress protocol ip pref 1 handle 101 \
flower src_ip "$sip" action pass
@@ -349,6 +353,8 @@ ipv4_sip_link_local()
log_test "IPv4 source IP is link-local"
tc filter del dev "$rp2" egress protocol ip pref 1 handle 101 flower
+ sysctl_restore net.ipv4.conf."$rp1".rp_filter
+ sysctl_restore net.ipv4.conf.all.rp_filter
}
trap cleanup EXIT
next prev parent reply other threads:[~2025-08-14 7:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 11:47 [PATCH net 0/2] mlxsw: spectrum: Forward packets with an IPv4 link-local source IP Petr Machata
2025-08-13 11:47 ` [PATCH net 1/2] " Petr Machata
2025-08-13 11:47 ` [PATCH net 2/2] selftest: forwarding: router: Add a test case for " Petr Machata
2025-08-13 20:40 ` Jakub Kicinski
2025-08-14 7:35 ` Ido Schimmel [this message]
2025-08-14 13:34 ` Jakub Kicinski
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=aJ2RvybsdTpRZ27k@shredder \
--to=idosch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.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).