From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id BA0885A0082 for ; Thu, 5 Jan 2023 06:45:45 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Nnb6Z1Pswz4y0g; Thu, 5 Jan 2023 16:45:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1672897542; bh=p9DVJo01HZVIzv6TEFiCivg9tMtJGFXt2PJ8nB7YA5Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FVC8KYQZsekbTnz0lHOEBrRAXI65Xq5a9R9Q04QuuYCnAqWcAPJ+dNDAgjs6cuk1c XE81qpNlFJCE6dexOE4xXeGucX1WTF54+ulCQDgz8dYV4gs7fBV0yHksSlnma5oTz9 iUdEqoTXJIEek85qq38y1ojXESIs0dMOvy/oNzNA= Date: Thu, 5 Jan 2023 15:54:02 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 17/18] udp: Use tap_send_frames() Message-ID: References: <20221209054228.4085990-1-david@gibson.dropbear.id.au> <20221209054228.4085990-18-david@gibson.dropbear.id.au> <20230104184525.31fc2f87@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QrJ+L/PGHzFktvXZ" Content-Disposition: inline In-Reply-To: <20230104184525.31fc2f87@elisabeth> Message-ID-Hash: YYYVE5UEKTK47PJQ5VVSEBHKJACRLT3S X-Message-ID-Hash: YYYVE5UEKTK47PJQ5VVSEBHKJACRLT3S 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: --QrJ+L/PGHzFktvXZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 04, 2023 at 06:45:25PM +0100, Stefano Brivio wrote: > On Fri, 9 Dec 2022 16:42:27 +1100 > David Gibson wrote: >=20 > > To send frames on the tap interface, the UDP uses a fairly complicated = two > > level batching. First multiple frames are gathered into a single "mess= age" > > for the qemu stream socket, then multiple messages are send with > > sendmmsg(). We now have tap_send_frames() which already deals with sen= ding > > a number of frames, including batching and handling partial sends. Use > > that to considerably simplify things. > >=20 > > This does make a couple of behavioural changes: > > * We no longer split messages to keep them under 64kiB, which comments > > say is necessary. However the TCP code didn't have equivalent code= , so > > either this isn't actually needed, or we should implement for both > > (which is now easier since it can be done in one place). >=20 > That used to be SHRT_MAX (32 KiB - 1), not 64 KiB. For some reason, if > I sent messages with multiple frames, with any one of them larger than > 32 KiB, qemu used to close the connection. >=20 > But it looks like this was caused by some issue in the handling of short > sends rather than an issue in qemu, especially given that, with this > series applied, I don't hit the original issue (and I could predictably > reproduce it earlier). Right, I already updated the commit messages and some comments based on the discussion we had last night. --=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 --QrJ+L/PGHzFktvXZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmO2V+QACgkQgypY4gEw YSLCuhAAnvG+NbZk7fOClaSx24U4VRNfB8U3ie6DU/2XBLwq92OKybp5GXlmjwQT TUS7+hf0R9ayd9w20IwcBMPEiiK3lVZH0f+Q39FHUXr1p0z6XYju3MkIP3WkNXUX /yvliOwZCqU5VAC/a9AL0K/KxiAOPap/cUtvjdqezR5ixUB4nukV7ryK4ICCV2Ii GgEbiQZM+gAde52kXfEovbmofHxaASAS9Si2JZnl231nT5DEYt+lv4ab6nR6JNsx mjXghDZqjvqYviABIju0IQglkceDegFCRQD2tT1vte42gmt/GLo7gTIOa7xReK24 oh2nATL+qlWptN63BTdIv0rrONqqGjF/hMJQTNlvsZIa0RWPqEadq9C/6CDWJJWp uFG2gYZkb1wdC242aYuiZFOMm/M7hR7F7QY6/qFqxNmKph6JLcvi88784gtbWa8G 1y1SEyN8NeJKq6eFdGMTWP+YBtQ0riGMiXbenIcQ8fwlxaXGbmZ3sm4qUy0ErbuO 4Re2l46IZO1rR8/MyC1lpLTuVEHsBkeIrjhglUyRgheuOkO2Pm08QkNRvP/Bmauo nfRHgKNnKf91ByUPAoQXLtqfMbKCFSTMNgl6y2gbe9mwSlVtp6OQ6+wyHy1GXS9M Ox+wAB1mKHkeVU+rT2jl/Hv227/3BLgIaMWtdNcxs69YdN0lAAM= =GF+E -----END PGP SIGNATURE----- --QrJ+L/PGHzFktvXZ--