From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SJxPKeAq; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id DB4655A061A for ; Sat, 19 Sep 2026 15:07:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789823268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zH5yEohuN7j3dG1dKThP7S6m82fteVlqfFzP0H0CY9c=; b=SJxPKeAqDKje5s3X7KsKCfpcBhkKZAn6/jrDZwW+cGKBgf4zdguNrC5bWDbaifxkD8qG1+ zCbxy6bSwqSvffSgeZFBBdzWqoQ7EI38+q2W2mdsA5pw6puY08WpJzSeZ7AEIJjh0B+jGZ oYzNy4yGUcNJ/Jli/PiB7sCEptUPoMI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-35-kubqzS_hNiuaDzkJmYMAdA-1; Sat, 19 Sep 2026 09:07:46 -0400 X-MC-Unique: kubqzS_hNiuaDzkJmYMAdA-1 X-Mimecast-MFC-AGG-ID: kubqzS_hNiuaDzkJmYMAdA_1789823266 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49fce60a8d4so2464015e9.3 for ; Sat, 19 Sep 2026 06:07:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789823266; x=1790428066; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=zH5yEohuN7j3dG1dKThP7S6m82fteVlqfFzP0H0CY9c=; b=RG2gDB4z8w8PW2exe1ZvUUDwsBI+3oxarLJZii6RHITQQFyShy1zrOFrqu8/ibHYrW 9IgOEG3/g37WVgLlIkmBOEheOrO0f/r8ZWXawYkgRmGvI/IpinCUniKnH4TNptVw+Bn4 cVNt9tbo99AlQtcWoMHlT51BCPd0VfB25L+SQHqim6U0NZN3u4M5xCjnuxq6UH003Bes TUZg0XAkbR9jg7xFOcJ52alW+OuiI1dlbeflSl7BWWdD//MIMPnXESDVg6+fCdKPNbfK FAq8Q7cIUlyxWH8hW7332ICP3VFUJnErABh4Jc+j9jwutm7ik0dOK2GIA/sCJ8wFiTMg Io0g== X-Gm-Message-State: AFuF++k3nL1dlYggiorrckr4ZQFWe+X+bRetEPIc5ywjIADQgr0UO1P2 oM1NAzBp9lZVSmtrn77mXPbo4qQbL/OUxkTnMxQnwxUgXs/sHhpJIIxwWtVHeqhPG0qmgqa8jYM o9Qli+IGmglkk56h0XJa3/uAivM+CWVTot2aAqayxAY3P+XdCJ4b6lQVfM7++lg== X-Gm-Gg: AYBFou2eKSEYhj8krL8QHbrtjKBVt/voNn37GsN9xbPQDTIGcliCye6Zn7yDeYn3zQL Hhm/80zbDcU3mPtGvEwn3vM+xjSCmqNcXhRfGym1VRXCXQwHgQdRJgylldZFP74lzznmBgBQtl+ XgipkV8JfNBs9K2g8SygCzXcPeHLg1Jy4X7ImGbsZBrx2khXn8paBJcVDNf0zshCqi4FEdNXvCT RpTI1Z4D1krQhUXXxZdX5k1PJWWNniMxFLHLTFjuu8hptH6VwxjYpKbsX/8MAV4RD20w9A0vp4/ mvv4dFfVh1YeUAJ4exLg4JFTxi6lgwN4zjpt7lUbUbluf26kueuQXKbnow4T0l/vfITPRQslFkP PGbWXCsyiEX4= X-Received: by 2002:a05:600c:154b:b0:49c:fa21:1c89 with SMTP id 5b1f17b1804b1-49fc5748e61mr80504985e9.30.1789823265684; Sat, 19 Sep 2026 06:07:45 -0700 (PDT) X-Received: by 2002:a05:600c:154b:b0:49c:fa21:1c89 with SMTP id 5b1f17b1804b1-49fc5748e61mr80504725e9.30.1789823265102; Sat, 19 Sep 2026 06:07:45 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fcd8bc15esm50014645e9.1.2026.09.19.06.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Sep 2026 06:07:42 -0700 (PDT) From: Stefano Brivio To: Martin Schitter Subject: Re: [PATCH v2 3/3] Optimize route dependency solver. Message-ID: <20260919150739.5d1f34ca@elisabeth> In-Reply-To: <8ce40343-41fa-4195-87da-de425b56f5ea@mur.at> References: <20260908181631.537802-1-ms+git@mur.at> <20260908181631.537802-4-ms+git@mur.at> <20260917210822.681fa49a@elisabeth> <8ce40343-41fa-4195-87da-de425b56f5ea@mur.at> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Sat, 19 Sep 2026 15:07:40 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: IxikwRGFB8ZwopCeknYTArLsYZJyOUvIRDNuz4llHEw_1789823266 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: UKZMEMUHOTN3VIA4ESO72WWSHI4I4OSZ X-Message-ID-Hash: UKZMEMUHOTN3VIA4ESO72WWSHI4I4OSZ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sat, 19 Sep 2026 14:56:56 +0200 Martin Schitter 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