public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Kuniyuki Iwashima <kuniyu@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Kui-Feng Lee <thinker.li@gmail.com>,
	Xin Long <lucien.xin@gmail.com>, Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v6 net 3/3] selftest: net: Add GC test for temporary routes with exceptions.
Date: Sun, 22 Mar 2026 11:03:50 -0600	[thread overview]
Message-ID: <cff10cf8-77dc-40b9-8030-25ee5ca24fc3@kernel.org> (raw)
In-Reply-To: <20260320072317.2561779-4-kuniyu@google.com>

On 3/20/26 1:23 AM, Kuniyuki Iwashima wrote:
> Without the prior commit, IPv6 GC cannot track exceptions tied
> to permanent routes if they were originally added as temporary
> routes.
> 
> Let's add a test case for the issue.
> 
>   1. Add temporary routes
>   2. Create exceptions for the temporary routes
>   3. Promote the routes to permanent routes
>   4. Check if GC can find and purge the exceptions
> 
> A few notes:
> 
>   + At step 4, unlike other test cases, we cannot wait for
>     $GC_WAIT_TIME.  While the exceptions are always iterable via
>     netlink (since it traverses the entire fib tree instead of
>     tb6_gc_hlist), rt6_nh_dump_exceptions() skips expired entries.
> 
>     If we waited for the expiration time, we would be unable to
>     distinguish whether the exceptions were truly purged by GC or
>     just hidden due to being expired.
> 
>   + For the same reason, at step 2, we use ICMPv6 redirect message
>     instead of Packet Too Big message.  This is because MTU exceptions
>     always have RTF_EXPIRES, and rt6_age_examine_exception() does not
>     respect the period specified by net.ipv6.route.flush=1.
> 
>   + We add a neighbour entry for the redirect target with NTF_ROUTER.
>     Without this, the exceptions would be removed at step 3 when the
>     fib6_may_remove_gc_list() is called.
> 
> Without the fix, the exceptions remain even after GC is triggered
> by sysctl -wq net.ipv6.route.flush=1.
> 
>   FAIL: Expected 0 routes, got 5
>       TEST: ipv6 route garbage collection (promote to permanent routes)   [FAIL]
> 
> With the fix, GC purges the exceptions properly.
> 
>       TEST: ipv6 route garbage collection (promote to permanent routes)   [ OK ]
> 
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
> ---
>  tools/testing/selftests/net/fib_tests.sh | 61 ++++++++++++++++++++++--
>  1 file changed, 58 insertions(+), 3 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2026-03-22 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  7:22 [PATCH v6 net 0/3] ipv6: Fix two GC issues with permanent routes Kuniyuki Iwashima
2026-03-20  7:22 ` [PATCH v6 net 1/3] ipv6: Remove permanent routes from tb6_gc_hlist when all exceptions expire Kuniyuki Iwashima
2026-03-22 16:59   ` David Ahern
2026-03-20  7:23 ` [PATCH v6 net 2/3] ipv6: Don't remove permanent routes with exceptions from tb6_gc_hlist Kuniyuki Iwashima
2026-03-22 17:01   ` David Ahern
2026-03-20  7:23 ` [PATCH v6 net 3/3] selftest: net: Add GC test for temporary routes with exceptions Kuniyuki Iwashima
2026-03-22 17:03   ` David Ahern [this message]
2026-03-24  0:10 ` [PATCH v6 net 0/3] ipv6: Fix two GC issues with permanent routes 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=cff10cf8-77dc-40b9-8030-25ee5ca24fc3@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@google.com \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thinker.li@gmail.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