From nobody Sat Dec 21 18:55:49 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 4YFtlt6sgRz5Ww0j for ; Sat, 21 Dec 2024 18:55:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFtlt5Cxfz4ftk for ; Sat, 21 Dec 2024 18:55:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3a9caa3726fso10381115ab.1 for ; Sat, 21 Dec 2024 10:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734807354; x=1735412154; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=j6faG1oPpxbe07yvcjsyZ345wfPxA7258ZApFAhS3fw=; b=Ap/uO7wFor4m26CxbMPRVrME6Z68SNnxe2FTLzPZkJ5b4SULb40vIfeNG6nrdSAbin ugUES0T7/GJcbJ3/7AqbELrc4j2HaOVcLzuC4NMeUVADxOY+uQfyygbzhE5MvmgFhPKI Xfph1T2KU3I57MlXht4lbhihhZEIlZ9GTSCyYS+A4/L7UEGkjLwQVM1db5rZIq1uu/Kz LR2svI/6wu1HlYPBhtgnJK/FRxYio1wjfRKGBT3ebnSLfbXhbCEl+tW4iFUl0NolnIBb 9G+itAhBYV5rv0CY+Wr03HnBtq1WDP009rP3f/8LULUboRY31m3L45wLXcYYR2ITy/zj HAOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734807354; x=1735412154; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j6faG1oPpxbe07yvcjsyZ345wfPxA7258ZApFAhS3fw=; b=E4VQC7bk8y1KtXvvkGGYLjJYBV43iMth53QBgaKpqA9mXMGe6iskOyjcElQdhLY6ct YD9dMOGDDRcEpAlV+H8ehWZmEmA3iiuB8pK/ABUHv3vLQsmn92G5X/kP+wG4yzkNqGct vDulNDe4Kq9yzozwbm/CD5AuXexIqn1LBsCRuqVKdjOnxkQ/6GTyWddlrHS5dW+pU1R+ t53Pw6+Ym4HLdVUCKp97fEzwIgJwYhnPF6jE7qqwGM6fJ5Z/ESJtiqPFTpnygAzZM9Iv BlT8C4VB77O5GYBxdaz4hyJZ1r75W9pAXOAWaRWXYKZpbH0Ujl/e7BWtrJg1gFXkAokP JSEw== X-Gm-Message-State: AOJu0YwRRk+H88uxru74LS5i/yUgm10Co8V60CHmolcgBLatqq84fhT1 6CQUzoTtbEbr0ON9Q7wkofrt7G0EmIGu5c4rsfQ+eZXEG2hhsa39QQzFwg== X-Gm-Gg: ASbGncvrfmJrDuo1IqDxwqubg28lMdOmT38TN3/3XnMRIBGTfLIe2fiSMK+03WEnnVH NBDAKRxvdYxKW7VHwy4VfXtYadOhs+Wcu3M1f9rH2LajqJ0t7nBZ7YnNJb/vpQSitrQqxTwAv6y RcnPG/Wuo3nIFbPvWzz9x5Bl9lQ5Vbe/xlx4Ag3tpdH7QO44hkuDHq5w2NeFFe+nVArvd7z9kFB 2d2RlkHKUqj//PCX7E6tNEHqcZetnBYvjkYcemDHNo1EaQkbTo26DrWoOpMuxukN7JpNHg= X-Google-Smtp-Source: AGHT+IELvSdtLptWGU6Q7x4DoHB70E2edOjCVGhVk1f19paLGX25Ef50JZce3IyZnUUj+F1Yk6HUzQ== X-Received: by 2002:a05:6e02:349c:b0:3a7:d02b:f653 with SMTP id e9e14a558f8ab-3c2f9815c0emr73102685ab.0.1734807353590; Sat, 21 Dec 2024 10:55:53 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3c0de0530fasm15229335ab.3.2024.12.21.10.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 10:55:52 -0800 (PST) Date: Sat, 21 Dec 2024 13:55:49 -0500 From: Mark Johnston To: "Bjoern A. Zeeb" Cc: 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-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:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4YFtlt5Cxfz4ftk 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? SCTP has its own notion of a routing table index, the VRF, which is already supported in some form by our implementation. I don't know much about the details. It might be that SCTP already provides similar functionality. > > 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. Certainly VNET jails provide equivalent functionality, but they have considerably higher overhead than separate FIBs. Moreover, they're less flexible than FIBs in that an application can only exist within a single VNET, whereas different sockets can be attached to different FIBs. > 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). > > 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). FIBs are certainly in use by at least one FreeBSD-using company, but I don't have any real details. Removing them is probably not on the table in the near to medium-term future. > 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