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=202504 header.b=rKu+u4wX; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 51A785A0008 for ; Tue, 08 Apr 2025 02:05:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202504; t=1744070746; bh=vjiWYQJcTqFSgMZHlsXUaPYk2JfhASdz5ck3IdjSPZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rKu+u4wXvzdY86jBLLh30gIKPgqFNEgnzK4FY0Gz2VILuaydsRGzTN+xX1MrlHUnr TWChrUu7p+VmXz8qdsC7LUB2EzrJ6egblFROTo4kQgVfy079jsmcyT4yYjuqLn3FYR /jF1TcLCCdkiGEA8rLEOPNggNMeOkGMiATAPgd49Dar9L2+2dxuBS8agS1BPy4C5vm 9oeE3YInYxAdRly6X5GGoYnVGHcXURGECSeaYbe683wybu8/+/RQWniE+d5lUadymm ImAf1GJ3BUGMPDRnuaEdn//XgPJwG0B9VN/WnQ5bc5f+J21MOkOOIDPtQVemVTDaO1 x61oWB8oiqsDQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZWmZ175WMz4xFt; Tue, 8 Apr 2025 10:05:45 +1000 (AEST) Date: Tue, 8 Apr 2025 09:50:10 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 00/12] Use connect()ed sockets for both sides of UDP flows Message-ID: References: <20250404101542.3729316-1-david@gibson.dropbear.id.au> <20250407234908.7ce7489d@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wBJCyjo0maK35QOv" Content-Disposition: inline In-Reply-To: <20250407234908.7ce7489d@elisabeth> Message-ID-Hash: C7RBOWP3N4S7CTDLA2YZO76KNI2IZ5B4 X-Message-ID-Hash: C7RBOWP3N4S7CTDLA2YZO76KNI2IZ5B4 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: --wBJCyjo0maK35QOv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 07, 2025 at 11:49:08PM +0200, Stefano Brivio wrote: > On Fri, 4 Apr 2025 21:15:30 +1100 > David Gibson wrote: >=20 > > As discussed, I've been working on using connect()ed sockets, rather > > than dups of the listening sockets for handling traffic on the > > initiating side of UDP flows. This improves consistency, avoids some > > problems (bug 103) and will allow for some useful future improvements. > >=20 > > It has the nice side effect of allowing some more code to be shared > > between various paths, resulting in a pretty nice negative diffstat. > >=20 > > David Gibson (12): > > udp: Use connect()ed sockets for initiating side > > udp: Make udp_sock_recv() take max number of frames as a parameter > > udp: Polish udp_vu_sock_info() and remove from vu specific code > > udp: Don't bother to batch datagrams from "listening" socket > > udp: Parameterize number of datagrams handled by > > udp_*_reply_sock_data() > > udp: Split spliced forwarding path from udp_buf_reply_sock_data() > > udp: Merge vhost-user and "buf" listening socket paths > > udp: Move UDP_MAX_FRAMES to udp.c > > udp_flow: Take pif and port as explicit parameters to > > udp_flow_from_sock() > > udp: Rework udp_listen_sock_data() into udp_sock_fwd() > > udp: Fold udp_splice_prepare and udp_splice_send into udp_sock_to_sock > > udp_flow: Don't discard packets that arrive between bind() and > > connect() >=20 > Applied. I took the liberty of fixing up a number of nits (all in > comments or outside functions), as that was all I had. I listed them as > comments to single patches. Thanks for all the little fixups :) --=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 --wBJCyjo0maK35QOv Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmf0ZKAACgkQzQJF27ox 2Gd6VQ/+KbvvfVccW9rTIeHWGn9OO/f2RkNs94skX+nH9ibB9yRJcAuye1ZcZFSh yUdiZh+xdwQ4rxwtS6tkueY0M6YFyk8PBvjMQ9h99lpIoX+w9jbC+wfT+pz9vxDy D6MTKUHRqJw659Fi9tHVTjwhqcYx4g9hfsyU0WeWCQToxCLGG4IxWLYsxnHM8Lp4 U1iBH2jhujgUIMIoA6U4HJGMMmGvJinc77EoFtCLWnNYRPrHtokDThSHJ1yMBmgv Eei8/wWj7ctAGb04qHbm6G23CVy8Lk3Z0QiL23v04Z7m1V67Vi0oGXN0rXfLpqxX VuAroGTFSpIAsHv775H1+KUkZ6Fb8CP1WfFOSlCF4Rswpfzpdt5IBcO2GEOD+hx9 4Df9Tt/ymZJJQ78mSKQRm5cNg1lGyZiNrNn3P4eg/YUaSV5X6nX0J4bRnNGZL4rW ZVbu4/D1rcOYOKjqRu5ssiw54I9Ijdb509NMwkxdNfesuaC2ni5akGyh+BaiXYyN AjgtP9F8RhC7oJGupoTWaBwODizM3ohrbhn+r0cBKXN0F3PmUv7WnZpn9KQVNyJg +/5zkvPzSuqcQ4ifK1kVRQ5nsPEK8NVAFz3FhLm6el31fs2zmUntsHoYii2Jl98g Er4qtkHerOVyPMYlrlPvpYnA8be30iRQZSB+lGAt2uqCQmQpEPI= =7TYU -----END PGP SIGNATURE----- --wBJCyjo0maK35QOv--