From nobody Sat Dec 21 18:48:33 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YFtbY3ydqz5WvK0 for ; Sat, 21 Dec 2024 18:48:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFtbY1b71z4fF6; Sat, 21 Dec 2024 18:48:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 4BLImXbX069855; Sat, 21 Dec 2024 20:48:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4BLImXbX069855 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4BLImXnF069854; Sat, 21 Dec 2024 20:48:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Dec 2024 20:48:33 +0200 From: Konstantin Belousov To: "Bjoern A. Zeeb" Cc: Mark Johnston , freebsd-net@freebsd.org Subject: Re: per-FIB socket binding Message-ID: References: <4p5o59s4-5p70-0775-1479-990o1s5po7r2@yvfgf.mnoonqbm.arg> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4p5o59s4-5p70-0775-1479-990o1s5po7r2@yvfgf.mnoonqbm.arg> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4YFtbY1b71z4fF6 X-Spamd-Bar: ---- On Sat, Dec 21, 2024 at 04:34:25PM +0000, Bjoern A. Zeeb wrote: > On Tue, 17 Dec 2024, Mark Johnston wrote: > > > Lately I've been working on adding FIB awareness to bind(2) and inpcb lookup. > > Below I'll describe the project a bit. Any feedback/comments/suggestions would > > be appreciated. > > > > Today, a TCP or UDP socket can receive connections or datagrams from any FIB. > > SCTP? > > > Any thoughts/comments? > > How much use are FIBs still these days? Half of the original use cases > I can think of could easily and better be overcome by using vnet jails > with a physical or virtual interface (e.g, vcc) being delegated to the > vnet. > > I wonder if anyone on FreeBSD is using FIBs to actually have multi-FIB > forwardig but that very little touches your use case apart from the mgmt > which again can be factored out better (or inversely, factoring out the > forwarding). nginx is aware of FIBs, and I use it to have one machine behind two routers on same local net to present two different https sites, avoiding virtual hosts. Fib 0 and 1 are configured with different default routers. Having to run whole vnet jail would mean much higher (admin) overhead for this case without adding any useful functionality. > > I would honestly know who and how FIBs are still in use today or if they > should be put on a list to be removed for 16 (I assume I might be > surprised). > > > That all said with your opt-in approach if the code itself doesn't bring > too many new complications I'd be happy with it (assuming FIBs still > have a use case). > > /bz > > -- > Bjoern A. Zeeb r15:7