From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 444495A0268 for ; Fri, 25 Nov 2022 08:17:23 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NJR5C6bXrz4xN8; Fri, 25 Nov 2022 18:17:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1669360639; bh=VH/2xb42dqfHCqik09GVXPqUJDDigkMA9nUiXRIlLzs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Sk+69Qvcsm6LiGqnJETNSrH22LR228pdUNCy+hWlzxnAm16wpgn6mQPFPvwvxlK2n 2hd5br7+dWkpe40VGTvj6hKu5hp+T9/Gc+gQnZ6AVtBWulSOjhRaV4juAS8QGcUyHi n2+AYABSvG/+IMnNjHYTsOeWOEdrgneDje0FE9cM= Date: Fri, 25 Nov 2022 18:09:05 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 09/16] udp: Don't explicitly track originating socket for spliced "connections" Message-ID: References: <20221124011659.1024901-1-david@gibson.dropbear.id.au> <20221124011659.1024901-10-david@gibson.dropbear.id.au> <20221125024805.3c95793d@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WpQP8yiFDVSwgj8J" Content-Disposition: inline In-Reply-To: <20221125024805.3c95793d@elisabeth> Message-ID-Hash: CCYEKABWLR2TGDFDCMGHSLNO5MUKNPRY X-Message-ID-Hash: CCYEKABWLR2TGDFDCMGHSLNO5MUKNPRY 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.3 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: --WpQP8yiFDVSwgj8J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2022 at 02:48:05AM +0100, Stefano Brivio wrote: > Nit: >=20 > On Thu, 24 Nov 2022 12:16:52 +1100 > David Gibson wrote: >=20 > > When we look up udp_splice_to_ns[][].orig_sock in udp_sock_handler_spli= ce() > > we're finding the socket on which the originating packet for the > > "connection" was received on. However, we don't specifically need this > > socket to be the originating one - we just need one that's bound to the > > the source port of this reply packet in the init namespace. We can look > > this up in udp_splice_to_init[v6][src].target_sock, whose defining > > characteristic is exactly that. The same applies with init and ns swap= ped. > >=20 > > In practice, of course, the port we locate this way will always be the > > originating port, since we couldn't have started this "connection" if it > > wasn't. > >=20 > > Change this, and we no longer need the @orig_sock field at all. That le= aves just @target_sock which we rename to simply @sock. The >=20 > Long line here. Fixed. --=20 David Gibson | 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 --WpQP8yiFDVSwgj8J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmOAagoACgkQgypY4gEw YSIz9Q/+NHSqlyzS2gSvmKiXZ9/7BdwpdbbGJuLz7YWVvCN8MOfE+dMh2sR2YsbF N6PKKToxtx1n4iUmKaMXBc61p47WZ97NhLVpmk9Ks+GhoNZaRPMNlqaq8/WrGDP0 V2/b07P2BSSUkxx10yVC5NsIoKawLYJJeDhkiQZNmdWOgnTWYoSlORMlQkpDKCkv YAGpcE2K6MdvefkmQNYQW39Byj0ekICruq66kqm0+0y7W8nZJ2BewIMr9QNsk1p4 0Cykhp4AYvYkYEU1B7ceXQLgXbW56OFaPzKREr+1lpawVcNv7hcY4/+DcD0xJm/l 9L3/CIH6DWQ2r6Ec/iqoim5cARAygZBnwUgPie4prpg6Q/TQgQBNtRABVXfsUQoM oLhf7KBM4aRKJmbB6AtOP/Kz6C17elJJpA17m1TO/7UvITvlOHsXzD2T4eR5fBuJ COLzsR5gm98vMCZXCeZfobQPZw6pheAhu7A8Utmdp1+c5Vn/LM7fPkTQWI8qgaNa fYjJVVd3ep25sMeFJedP9ahzis9Eid2u1gWEdXR8gP0THIZ3oRvshY/1KQ0SKYmU 4Vf+9WPfqNOP25OoQ8D9PHhdGOZQyc4f743jTKRwzUOE7kwS4XCxxTFlZSdAXxNq KMzlT0m0emrbrvQmA2TXTSWi45ybKJ0ucrPJPb6SylhkLD3zdsI= =czUL -----END PGP SIGNATURE----- --WpQP8yiFDVSwgj8J--