From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=mur.at Authentication-Results: passt.top; dkim=pass (3072-bit key; unprotected) header.d=mur.at header.i=@mur.at header.a=rsa-sha256 header.s=dkim2 header.b=cM/nSozQ; dkim-atps=neutral Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by passt.top (Postfix) with ESMTPS id EC3375A0619 for ; Sat, 19 Sep 2026 14:56:56 +0200 (CEST) Received: from [192.168.4.117] (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 9216046080; Sat, 19 Sep 2026 14:56:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1789822616; bh=244Wuw82+dqSONaRRaQ/iPJKIPFDUK1vQKPhz34xyrI=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=cM/nSozQTBJSJJKeRSF0r/sVxD7+uOX45aGfeuLcy6cbeqTUX34S8gyG//02f4p7P HOKlhU+1XznFIsLaWRgjNubxG2NoTCIZj/4i+0z0/qWa2r43uy4+ftFTpMEuqYnG7G QVrowosRl4lZwrP+0g9q48kmQegxkXu53bu/w66lyXzRhLEnFB36XKwuvsXX8DjD3w 5V5yHeJ5JIOOxjVtHC4v7R45Apq1ABllVZ6QoTED3K4pO17jC6cMpdn4G4YwVXr4RY VYf8q+o4FcOJlmo6ATLEssZZ3hP0iww10VlI2KiLAHTuN0I2eFGHr9OtXw8L5dLXuq nd5rpBZBVa7W9FBOpPyZazk3Ty0rY0gfif4cqn7znG0ohNl1p28TnSCyE5gooYirlQ dFOYKkyz+6DaH4y8H4vFnJReNZCX4OEG5o/FtuLpv4lp1FQ47kW1Bf3uZg+njc9uGf a6mV0soUWYzzeTfUUOVGwZw2K6SM42qgih/OoNlIyOkw/UWQIQZ Message-ID: <8ce40343-41fa-4195-87da-de425b56f5ea@mur.at> Date: Sat, 19 Sep 2026 14:56:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Martin Schitter Subject: Re: [PATCH v2 3/3] Optimize route dependency solver. To: Stefano Brivio References: <20260908181631.537802-1-ms+git@mur.at> <20260908181631.537802-4-ms+git@mur.at> <20260917210822.681fa49a@elisabeth> Content-Language: de-DE, en-US In-Reply-To: <20260917210822.681fa49a@elisabeth> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MailFrom: ms+git@mur.at X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: FVTY5PTBNES2ODIP7TAQCVKW4WGZFUVJ X-Message-ID-Hash: FVTY5PTBNES2ODIP7TAQCVKW4WGZFUVJ X-Mailman-Approved-At: Sun, 20 Sep 2026 11:27:02 +0200 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 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). */ That's a much nicer and more efficient solution than all our previous attempts. So I'll have to rewrite the whole thing again... It will take a few days.