From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202512 header.b=cxeMlXYD; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 78C0A5A0624 for ; Wed, 14 Jan 2026 01:42:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1768351319; bh=N5Dwpe9NEaFUklHFTn+Q5uz3ui6QnDLbMhwNhShv4FI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cxeMlXYD1t1y4L7+0LV90drcefVnZJJ9FyNn8jvCx/zqDN/LXbokQ5+KJZvrAfqJu S1yHUZb9KRya45ej32VIrsR7iM0HTjPt+HxheNk4vpTrr+RvRxyvRqWxU/oRoaRS8f O3Hkx4lxjwO5HQbIAsembT4aO7y/sGw+JMII2Iz2wHXShrKEK+y2hkTTB+Ngb5ARwo PLP+AV5h3eROyN8EUiRv+iedxp5Ow8pU91LL1hgmUnGGvWfC47nQnykbS5TYhDQady eJuMa+04LqvBFJhES8+oMFYtZZlxHHt7xOEhO0j4Gdi4cCGepY/3i7Yhq8uD+rgqpd kARF+Ui+l6TYA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4drS472mq1z4wR5; Wed, 14 Jan 2026 11:41:59 +1100 (AEDT) Date: Wed, 14 Jan 2026 10:57:04 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 05/14] fwd: Make space to store listening sockets in forward table Message-ID: References: <20260108022948.2657573-1-david@gibson.dropbear.id.au> <20260108022948.2657573-6-david@gibson.dropbear.id.au> <20260113002622.48f32d54@elisabeth> <20260113231331.086bd504@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BvSyuaLGgPYmHcgT" Content-Disposition: inline In-Reply-To: <20260113231331.086bd504@elisabeth> Message-ID-Hash: NFY6MHV4SLRT7TBNTFFXAEUVBEKNSAEK X-Message-ID-Hash: NFY6MHV4SLRT7TBNTFFXAEUVBEKNSAEK X-MailFrom: dgibson@gandalf.ozlabs.org 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: --BvSyuaLGgPYmHcgT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 13, 2026 at 11:13:31PM +0100, Stefano Brivio wrote: > On Tue, 13 Jan 2026 16:28:27 +1100 > David Gibson wrote: >=20 > > On Tue, Jan 13, 2026 at 12:26:22AM +0100, Stefano Brivio wrote: > > > On Thu, 8 Jan 2026 13:29:39 +1100 > > > David Gibson wrote: > > > =20 > > > > @@ -74,6 +83,8 @@ enum fwd_ports_mode { > > > > * @rules: Array of forwarding rules > > > > * @map: Bitmap describing which ports are forwarded > > > > * @delta: Offset between the original destination and mapped port= number > > > > + * @listen_sock_count: Number of entries used in @listen_socks > > > > + * @listen_socks: Listening sockets for forwarding =20 > > >=20 > > > To keep those aligned: > > >=20 > > > /** > > > * fwd_ports() - Describes port forwarding for one protocol and direc= tion > > > * @mode: Overall forwarding mode (all, none, auto, some ports) > > > * @scan4: /proc/net fd to scan for IPv4 ports when in AUTO mode > > > * @scan6: /proc/net fd to scan for IPv6 ports when in AUTO mode > > > * @count: Number of forwarding rules > > > * @rules: Array of forwarding rules > > > * @map: Bitmap describing which ports are forwarded > > > * @delta: Offset between original and mapped destination port > > > * @listen_sock_count: Number of entries used in @listen_socks > > > * @listen_socks: Listening sockets for forwarding > > > */ =20 > >=20 > > Done. I'd also be very open to more succinct names for these fields, > > but they haven't occurred to me yet. >=20 > @sockets: Array of listening sockets for inbound port forwarding > @sockets_count: Count of used @sockets >=20 > ? I mean, they're obviously listening sockets. I wasn't sure about that. But that fact it's obvious to you is evidence in that direction. So, I've gone with 'sock_count' and 'socks'. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --BvSyuaLGgPYmHcgT Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlm288ACgkQzQJF27ox 2GcUoA/5AR+iCCofAYUWZC6YnJMWXSe3Fkrc/pv+7jKtiLdM70Q2mIIxNMg5ibQp UKawQ2LrkNVMDV5loGksj9s4uNYs06KFjtp/UjWWI30nQkBOWxacgHXcGvEgrVmm oCsRTxSyfce8+l9rUpWGxnqZPOuX9QjCJlqUqc1tFdtoyRUta0XcC2bHVFtNuRSV 9Vw6JpcW9mINuFEPTduX6pPNT/SR3s45EJZs/yrTEZcb6iLukGXuim2sxfkSz43P ypC49CKY1/AlVLgK1FEVVJ/hQOCevDGiw3wJ9j3//S9t3SE99Nm7FOP/UU1bCilM jBMVuhsN6oXp2yOEx80680ypCexRiA+qyyLw+btNDhI9f5nzRkMPePAdiCKH+E9Q SEIvIBVBevh+erSpTfAe4bvybn/UaCadgfpOimQGqahgetRcuti+fk7VoWk7l2sn tp4NjzLEDspKEciyrwlug8ns+R72TUl7iPoGxrCYrUnS2vQHIT+A/cwiUsQLDRvJ YK4M4znwdqJb0UYrAOy/Kn6SMIknjOLiKigExAErwGIZXtd1R7pvx1GBJJtfV+ps c7yho3PEzFiV8seat6E7MjN3EFn4gyp/76fKD2SLGnOJ7m+u/TlQbQUM/SLSSUUM 6Sy/OkTedRfjKI7EkO3nxgCdalSGeoAVKqESt9ZGPUKLndx4Hl4= =n+0i -----END PGP SIGNATURE----- --BvSyuaLGgPYmHcgT--