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=202410 header.b=YJAM/FiU; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 6C2475A0622 for ; Thu, 14 Nov 2024 05:40:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1731559206; bh=TnueROmdz/Z36PuEhJuk4USe9SfN1RWIU8YzWrnH5EA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YJAM/FiUqkmbphYmMvthlcCyq0dr5c2wRzeLpUbJ5yJJrCvyGu4ZXcdAFoo8ffsFA 31giYiXQaYw1RWa+6DriTa+rQTAUCM8hmismgRmEHAJqu1atwH1z95sOgdem+x5lNd 1fAm+TLTVFq0xf9eiMkCHPb3Ksc7b/6jEbadg6xXxEsmPiAPHeSLya1nsuBrC0azz5 BTnYOEtsrC3g4gyikUqJ9QHIwmykgNL9h1kDWbEEBpaYUOVJ/TVd7W/wbBR0kTMb/W 2ALwkyts3/EXuJsM4mTSRiUrJqfasAFXoA5lcBtIuKuriHc9fBUcbSlBvFlWA/SNMx pCCJowtD3pspg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XpnWV1wLNz4x8C; Thu, 14 Nov 2024 15:40:06 +1100 (AEDT) Date: Thu, 14 Nov 2024 15:33:22 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v10 07/12] vhost-user: add vhost-user Message-ID: References: <20241108103733.3554357-1-lvivier@redhat.com> <20241108103733.3554357-8-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Iq3hYLmFFahg67Cu" Content-Disposition: inline In-Reply-To: Message-ID-Hash: QH7UJN37QFMBOIKUS7EXIRGLUFRP4QHF X-Message-ID-Hash: QH7UJN37QFMBOIKUS7EXIRGLUFRP4QHF 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: --Iq3hYLmFFahg67Cu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 13, 2024 at 08:13:43AM +0100, Laurent Vivier wrote: > On 11/11/2024 03:47, David Gibson wrote: > > > + if (flow_sidx_valid(sidx)) { > > > + flow_sidx_t fromsidx =3D flow_sidx_opposite(sidx); > > > + struct udp_flow *uflow =3D udp_at_sidx(sidx); > > > + > > > + flow_err(uflow, > > > + "No support for forwarding UDP from %s to %s", > > > + pif_name(pif_at_sidx(fromsidx)), > > > + pif_name(pif)); > > > + } else { > > > + debug("Discarding 1 datagram without flow"); > > > + } > > > + > > > + continue; > > > + } > > > + > > > + toside =3D flowside_at_sidx(sidx); > > > + > > > + v6 =3D !(inany_v4(&toside->eaddr) && inany_v4(&toside->oaddr)); > > > + > > > + iov_used =3D udp_vu_sock_recv(c, ref.fd, events, v6, &dlen); > > > + if (iov_used <=3D 0) > > > + break; > > > + > > > + udp_vu_prepare(c, toside, dlen); > > > + if (*c->pcap) { > > > + udp_vu_csum(toside, iov_used); > > > + pcap_iov(iov_vu, iov_used, > > > + sizeof(struct virtio_net_hdr_mrg_rxbuf)); > > > + } > > > + vu_flush(vdev, vq, elem, iov_used); > > Do you really want to flush on every datagram? >=20 > To do like that avoids complexity in the code, but you're right it could = be > improved but I would prefer to do that once this series is merged with a > follow up code. This kind of change is prone to introduce bugs... Ok, fair enough. --=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 --Iq3hYLmFFahg67Cu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmc1fY0ACgkQzQJF27ox 2GeYlBAAilmAkKCH72NhkCZV0LJ6MoozDzVjR213QT8oyclyrxU6QDFOiMnTTj6K nyOXGyysMRO6OQPXKimwxuJ/CdzO9+iPTanB9njS/MPLawDhR9N+EmN4I2+cNNqf chNBvlmd7iiBUDJqlfbePtEa6vj9npR/aoCllFKcr0ekaqdP9vuEctLSGcwEUdB6 Xw2QJPJ3oDnQN39ZCI+/Gm0fCQwhhvf3tZzVCbTNe5NUBJKG/y1qJNBCCRr1Lb09 b9FRCncHiKCfde5qbJirH9v5B7s2qzOAp8WXWmDTkQkr1ZEFD+IHlWCGbaCtWHhe VH9WeRp9qQwj6Od255YG0hMJ0EKEINRbh+2ROo2eMfi/fIKliiEDHGFzKShHXfG1 rBr7apKv+18/GpU+gveUrGdyu+F8/Tu5omvWERll7SjF5O4qaZ5tTIsqG0+guprR rzdZwsjN4OAfqHi0GdwjhE4Ovvfokp5KLz5ktFl+I+NHsOCEEFHWO8utIuQ4qj38 cVG/lRbjKj+MOh6JDSi1ETY5101jrUcDhPO0LfogN8/VstTmpg2d1zI+atMnkEpU mdQ82PvVT5ePU5JhJ7V4vO1KPFZf7h/41mFTO/98r2Jo9SCwOE5dbt6wuc6sSTrq xTHjiESXVoQ4JH5b+n1YiX7Bn+XxR3g8vu2m9qKttc2on3vWKBA= =o0nx -----END PGP SIGNATURE----- --Iq3hYLmFFahg67Cu--