public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Martin Schitter <ms+git@mur.at>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 3/3] Optimize route dependency solver.
Date: Sat, 19 Sep 2026 15:07:40 +0200 (CEST)	[thread overview]
Message-ID: <20260919150739.5d1f34ca@elisabeth> (raw)
In-Reply-To: <8ce40343-41fa-4195-87da-de425b56f5ea@mur.at>

On Sat, 19 Sep 2026 14:56:56 +0200
Martin Schitter <ms+git@mur.at> wrote:

> On 9/17/26 21:08, Stefano Brivio wrote:
> >> Never make more resolution attempts than there are still unresolved
> >> dependency errors.
> >>
> >> In the context of my current mesh network with ~700 route entries
> >> these changes reduce the required processing time from 5.5s to 15ms.  
> > 
> > Ouch. Nice.  
> 
> After searching for answers, how these ENETUNREACH and EHOSTUNREACH in 
> the dependency solver routines are actually caused, I finally looked 
> into the iproute2 code for the save and restore commands:
> 
> https://github.com/iproute2/iproute2/blob/e6471d772f3e15a813e6c9a81b4b7adcfad22899/ip/iproute.c#L2314
> 
> Now I finally see that this task can be handled without all this stupid 
> trial-and-error play and doesn't require a limit of route entries if we 
> just reassemble the routing tables in three successive steps resp. loops:
> 
> /* Restore routes in correct order:
>   * 0. ones for local addresses,
>   * 1. ones for local networks,
>   * 2. others (remote networks/hosts).
>   */

Just a quick comment before you risk losing a lot of time (I'm really
not sure though): there *might* be interdependencies between routes in
1. and between routes in 2., especially with 'nexthop' objects. And
IPv6 has several scopes. Maybe it all works thought, I haven't checked
your iproute reference yet.

-- 
Stefano


      reply	other threads:[~2026-09-19 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 18:13 [PATCH v2] Fix for Bug #221 -- Issue concerning bigger routing tables Martin Schitter
2026-09-08 18:13 ` [PATCH v2 1/3] Fix handling of netlink multipart route dumps Martin Schitter
2026-09-17 19:08   ` Stefano Brivio
2026-09-19 12:56     ` Martin Schitter
2026-09-08 18:13 ` [PATCH v2 2/3] Timekeeping: Resolving Route Dependencies Martin Schitter
2026-09-17 19:08   ` Stefano Brivio
2026-09-19 12:56     ` Martin Schitter
2026-09-08 18:13 ` [PATCH v2 3/3] Optimize route dependency solver Martin Schitter
2026-09-17 19:08   ` Stefano Brivio
2026-09-19 12:56     ` Martin Schitter
2026-09-19 13:07       ` Stefano Brivio [this message]

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=20260919150739.5d1f34ca@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=ms+git@mur.at \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).