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=202412 header.b=B06Bohpn; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 60B2E5A026F for ; Tue, 10 Dec 2024 02:17:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202412; t=1733793438; bh=QUn/Nr46xUs2S4Zq3pxqxRYkgrWld+eIgd/dAEpYlTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B06BohpnA73KRrlDv1FVEUcWEU6EkU14lNq+Q8zRVCD/rRWt93zB1pCJBUX+bTqdO roY7ALGAIkk1R6BvnJy+F/hnzyMXhTJYPuomsCbAY5BDRhYtvzMjPJXibzg5xKH2FR Uh7hcfCUKlrjYM/odxPZ/6g/lmzvAocLmvJPwT1iuaExsKxxvpRY0LHJ0DJZV13cqr 65bjAsRIovIRNG27WMRuoVMd6mld3yJs2FH6FUkKlU1KqF50wfDmwTXY/MEc8/beEe nox9eJNAcCXNzu6FPUEyRYPvvLFCpHE1fn4G54W2g8eLt/I7m8Fb2rvC1Q/IGIjM9R aVy8ONmCNdQ0Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Y6gnV4gQjz4wcs; Tue, 10 Dec 2024 12:17:18 +1100 (AEDT) Date: Tue, 10 Dec 2024 12:17:16 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 2/2] tap: Call vu_init() with --fd Message-ID: References: <20241209165450.2314060-1-lvivier@redhat.com> <20241209165450.2314060-2-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="O5jo9Z1vUoVeIzGg" Content-Disposition: inline In-Reply-To: <20241209165450.2314060-2-lvivier@redhat.com> Message-ID-Hash: 43TU7AYIQFEZKRUUMGMTOCPGPS633NVV X-Message-ID-Hash: 43TU7AYIQFEZKRUUMGMTOCPGPS633NVV 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: --O5jo9Z1vUoVeIzGg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 09, 2024 at 05:54:50PM +0100, Laurent Vivier wrote: > We need to initialize vhost-user structures with --fd too. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tap.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/tap.c b/tap.c > index b2d30456e8dc..cd32a901e534 100644 > --- a/tap.c > +++ b/tap.c > @@ -1405,10 +1405,12 @@ void tap_sock_update_pool(void *base, size_t size) > */ > void tap_backend_init(struct ctx *c) > { > - if (c->mode =3D=3D MODE_VU) > + if (c->mode =3D=3D MODE_VU) { > tap_sock_update_pool(NULL, 0); > - else > + vu_init(c); > + } else { > tap_sock_update_pool(pkt_buf, sizeof(pkt_buf)); > + } > =20 > if (c->fd_tap !=3D -1) { /* Passed as --fd */ > ASSERT(c->one_off); > @@ -1421,8 +1423,6 @@ void tap_backend_init(struct ctx *c) > tap_sock_tun_init(c); > break; > case MODE_VU: > - vu_init(c); > - /* fall through */ > case MODE_PASST: > tap_sock_unix_init(c); > =20 --=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 --O5jo9Z1vUoVeIzGg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdXlpsACgkQzQJF27ox 2Gcqlg//RsxkMC/jIrMlcyooafnNzmkKU7IvxKHV71nehQqzDLN9dYwl4US9nXOb ZuiRScUn0vLBgf1WDjyqeOvzROwSxwQ6jHdKNPdzlo/pTNRMyiHY9a47Uke3nx4o Ke2duxv/MQP7fHlaI04Jge37Q1cso81leCrBiBo54PdSecVjR2nLtaZyq8W57Q/k I23+aNHquFP7g82yQibsc2KayIjKA88MVA3Z4gugLHMox0T6w9/p/BPeNaVmK1nI ynNouYvb0lMP1sIompyETgcsv1l5GLnpMjCe4zpTIQvDVuSeuqyULI3szS2Q6uQs upDsEwSwDYuR+V91Sz3hYnZQab/+rd2X1kChjmRd5IT8WEXOPu3z0KAUsiibWxA5 Hg3uiyoxZdppONnTvfX1PQLPO7gn5P2QeabROi9TImp6JTlD57KZ033JK6jfMfKy eC7FMXEoAzNLSv75BcD5PtBkoFUga6A+qdxqztXnSQnwldiZbLpwTXUV2GrCTWYZ z2w5vB7CTHsAfsuPyBXOkSU+E92bMxevCRfDKqhZmx+3YoRBoKE0iJcZWQ3Sdfyc KROqjV0Rw0Wu3GUNW1F1j46Y/PoxEVVpugu2qAM3aGWra1/qfqNoaLFfuCs5yjUr Skear10xkYMvrDIWtI2wUyx76VV+yullq4bRnnVSPFfbXGlxYm0= =QyYV -----END PGP SIGNATURE----- --O5jo9Z1vUoVeIzGg--