From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 8C9075A004E for ; Fri, 12 Jul 2024 00:59:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1720738742; bh=G/+3mnDxiGrLruMBENUDp989bwU6p+04+awUMQq90Cc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g/4/aw3LVCkJxCOoL+3+MYNUrDfkm0p63R4QKmkbRfZw3Gjpa8lP6FZGnEORfZMOK 1+gWR5DCfhejPlckVHb2e2ZuO4gk68iGAPhGfc9b77umEa37dYA2y+vEjT5F579+7C 3CK2fTm15XwnkOw5N04NBESIFPRT2B8TmW45hlNKhJ8r42RPsX1QMIQjXLKu9Zbnho U2uczKhWFGha2T5oZgJC1CoG2vksyHzARj3ltfjzn4P6NzFEqL2U/Yh4H/gf94kQnL us8qhR07BwwzNG4kUIcwmBAchIMS3Jtd9MzHcJG3PKPRkooj78dWYP35pUdhdwz53+ KRykB3lO0Mq3w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WKqsf2b2rz4x12; Fri, 12 Jul 2024 08:59:02 +1000 (AEST) Date: Fri, 12 Jul 2024 08:58:57 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v7 20/27] udp: Create flows for datagrams from originating sockets Message-ID: References: <20240705020724.3447719-21-david@gibson.dropbear.id.au> <20240710003202.2909199a@elisabeth> <20240710233503.03147137@elisabeth> <20240711101937.2f7fb626@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wCcb/lURLscg67EV" Content-Disposition: inline In-Reply-To: <20240711101937.2f7fb626@elisabeth> Message-ID-Hash: UBNE5DEKGAU7LNSNBFCXG7TIUDW5OZ3K X-Message-ID-Hash: UBNE5DEKGAU7LNSNBFCXG7TIUDW5OZ3K 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, jmaloy@redhat.com 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: --wCcb/lURLscg67EV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 11, 2024 at 10:20:01AM +0200, Stefano Brivio wrote: > On Thu, 11 Jul 2024 14:26:38 +1000 > David Gibson wrote: >=20 > > On Wed, Jul 10, 2024 at 11:35:23PM +0200, Stefano Brivio wrote: > > > On Wed, 10 Jul 2024 09:59:08 +1000 > > > David Gibson wrote: > > > =20 > > > > On Wed, Jul 10, 2024 at 12:32:02AM +0200, Stefano Brivio wrote: =20 > > > > > Nits only, here: > > > > >=20 > > > > > On Fri, 5 Jul 2024 12:07:17 +1000 > > > > > David Gibson wrote: > > > > > =20 > > > > > > [...] > > > > > > > > > > > > + * @c: Execution context > > > > > > + * @proto: Protocol of the flow (IP L4 protocol number) > > > > > > + * @pif: Interface of the flow > > > > > > + * @esa: Socket address of the endpoint > > > > > > + * @fport: Forwarding port number > > > > > > + * > > > > > > + * Return: sidx of the matching flow & side, FLOW_SIDX_NONE if= not found > > > > > > + */ > > > > > > +flow_sidx_t flow_lookup_sa(const struct ctx *c, uint8_t proto,= uint8_t pif, > > > > > > + const void *esa, in_port_t fport) > > > > > > +{ > > > > > > + struct flowside fside =3D { =20 > > > > >=20 > > > > > And the "f" in "fside" stands for "forwarding"... I don't have any > > > > > quick fix in mind, and it's _kind of_ clear anyway, but this make= s me > > > > > doubt a bit about the "forwarding" / "endpoint" choice of words. = =20 > > > >=20 > > > > Heh, no, here "fside" is simply short for "flowside". Every flowsi= de > > > > has both forwarding and endpoint elements. =20 > > >=20 > > > Oh, I thought you called it fside here because you're setting the > > > forwarding part of it directly, or something like that. > > > =20 > > > > So it is confusing, but > > > > for a different reason. I need to find a different convention for > > > > naming struct flowside variables. I'd say 'side', but sometimes > > > > that's used for the 1-bit integer indicating which side in a flow. > > > >=20 > > > > Hrm.. now that pif has been removed from here, maybe I could rename > > > > struct flowside back to 'flowaddrs' or 'sideaddrs' perhaps? =20 > > >=20 > > > That's also confusing because it contains ports too (even though sure, > > > in some sense they're part of the address). =20 > >=20 > > Right :/. > >=20 > > > I would suggest keeping it > > > like it is in for this series, but after that, if it's not too long, > > > what about flow_addrs_ports? =20 > >=20 > > Still need a conventional name for the variables. "fap" probably > > isn't the best look, and still has the potentially confusing "f" in > > it. > >=20 > > > Actually, I don't think flowside is that bad. What I'm struggling with > > > is rather 'forwarding' and 'endpoint'. I don't have any good suggesti= on > > > at the moment, anyway. Using 'local' and 'remote' (laddr/lport, > > > raddr/rport) would be clearer to me and avoid the conflict with 'f' of > > > flowside, but you had good reasons to avoid that, if I recall correct= ly. =20 > >=20 > > Kind of, yeah. Local and remote are great when it's clear we're > > talking specifically from the point of view of the passt process. > > There are a bunch of cases where it's not necessarily obvious if we're > > talking from that point of view, the point of view of the guest, or > > the point of view of the host (the last usually when the endpoint is > > somewhere on an entirely different system). I wanted something that > > wherever we were talking about it is specifically relative to the > > passt process itself. > >=20 > > I get the impression that "forwarding" is causing more trouble here > > than "endpoint". "midpoint address"? "intercepted address"? > > "redirected address" (probably not, that's 'r' like remote but this > > would be the local address)? >=20 > I think "forwarding" is still better than any of those. Perhaps "passt > address" (and paddr/pport)... but I'm not sure it's much better than > "forwarding". Hm. "passthrough address"? Kind of means the same thing as "forwarding" in context, and maybe evokes the idea that this is the address that passt itself owns? --=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 --wCcb/lURLscg67EV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmaQY58ACgkQzQJF27ox 2Gfy2BAAiQ7VZE7PyJi2p0xq/UPRGnsfvmqtmP3vBVxUgQgnXQjc2AnnMd1D9EZs Ni5Y3BhxkhmPPd406iXvLt0ESbA7DvgjJhZgEgJK0Qf8KI+9H5u8hgVSq/ny3ucb 68EScXiVyq6NqR8Ue/Mh4zWAK34bfKmTYc+dezOCsMDYJaHbRvJGrTxI4X0foggp h3Np81SFKMFIzTlfrf7+Q61iAAnXlCsaG82D18e0RBXX6l2bkEKdvVVE7Lw/sCI6 lN7jeluA07mv156umsg+8ndFA9An+kyfawg0ad/H2i5n7lD5jdQQIE0AyqmXe/Nc Gp/kXFU7M6S6HwaA6T4kUoE1J9OeqSIwbyUZ5q31RNnO0hUlYDtnfnkfiNDcU8On vW18oni4+wEPVVZFwp+PMNlSx7eIlSscljAORAoGaqRYZE/J29qsiGVo3cBb+4Qu wnsvZOq7zt4fK/HxlEp5pwkBIeKQ8sn8cSMeRiNrw2XWs1GhvA91CA5t9HlbmR3t B9T3VlOoZO5OGO0Js3WiRWEu71nkl1gcZZ0JUKUENe6qHx9O28hBsRNQG+A3bbIK OX2toBT73ywuZgHAR/zsTJK/t8nIxnaNEEIms9qwq3OBW4OSRDWXOGS0d2YCCyv6 YoBsRJ/toU2ZZcq1BXj4GZv+N+0A8QjJBuHjh11upwnssmqY1tk= =9tna -----END PGP SIGNATURE----- --wCcb/lURLscg67EV--