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=202502 header.b=NxBvVzaM; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 1B0645A026F for ; Thu, 03 Apr 2025 03:51:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1743645057; bh=d0PWRSF+jEhhaoaKBboNmHCeYN/wPtzlmH5BJoNCumM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NxBvVzaMPHqSbyR6+8OmAXLpGKpLCZw8HkH1izp154hTRX+31Cd/iulGu7ZQVMNMk peov6+pykN7W50TbWH05OpuDrkcVKuKu+cb5nLNIXBa+m3Q2+BD2r65YZe9LMPglmI GuJinAf7A3M2DyZ8p2xPH3hQZ5gw1ZVt4EDBmmw1/SwCvrmhnC6RI0Aof4d5EXxuhb w9iij3VmujGI1uagT3svJnEg48L2dilWume5qehNO0GPevZXzzM6aHxTMyzK9XFY6B gD9Rie8hqVDLq/Ls/jNfX59HxmcOPIBRqTnBtpImm2XmUee8Eg08s2Ny+31gw93Q1N YOodF/J+eF/uQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZSl7j31n9z4xG8; Thu, 3 Apr 2025 12:50:57 +1100 (AEDT) Date: Thu, 3 Apr 2025 12:48:42 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 2/3] tap: implement vhost_call_cb Message-ID: References: <20250401113809.1765282-1-eperezma@redhat.com> <20250401113809.1765282-3-eperezma@redhat.com> <20250402091622.7cda67ba@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/JbFNL/QYtAoocgb" Content-Disposition: inline In-Reply-To: <20250402091622.7cda67ba@elisabeth> Message-ID-Hash: BTEYGVFXQCIGZRN4BD43VAACFQQTJ4JZ X-Message-ID-Hash: BTEYGVFXQCIGZRN4BD43VAACFQQTJ4JZ 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: Eugenio =?iso-8859-1?Q?P=E9rez?= , passt-dev@passt.top, jmaloy@redhat.com, lvivier@redhat.com, dgibson@redhat.com 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: --/JbFNL/QYtAoocgb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 02, 2025 at 09:16:22AM +0200, Stefano Brivio wrote: [snip] > > static int tap_ns_tun(void *arg) > > { > > + /* TODO we need to check if vhost support VIRTIO_NET_F_MRG_RXBUF and = VHOST_NET_F_VIRTIO_NET_HDR actually */ > > + static const uint64_t features =3D > > + (1ULL << VIRTIO_F_VERSION_1) | (1ULL << VIRTIO_NET_F_MRG_RXBUF) | (1= ULL << VHOST_NET_F_VIRTIO_NET_HDR); > > struct ifreq ifr =3D { .ifr_flags =3D IFF_TAP | IFF_NO_PI }; >=20 > I kind of wonder, by the way, if IFF_TUN simplifies things here. It's > something we should already add, as an option, see also: > https://bugs.passt.top/show_bug.cgi?id=3D49, but if it makes your life > easier for any reason you might consider adding it right away. I agree that supporting IFF_TUN would be a good idea in general. I think trying to do it in the middle of this will be unnecessary difficulty though. There are a bunch of places throughout the code that assume we have Ethernet headers, and changing that will require a pretty wide ranging rework. --=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 --/JbFNL/QYtAoocgb Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmft6PoACgkQzQJF27ox 2GemAw/9FDVIhIonT7IxMiu3Fd5bRmikUzUxWfdG/neI8nXSSjwAzVuZe9kiflow PF4J7fl31GFGf1NRqppXN9WVeEV2FuMESZKy2POc2VA8g87ehf2qrLAKEeIQhhBn dsBwVUWZeqzIURMvLmywRiVvlG4hr7JymmWLrRlvayNq8TBivYeZGWjwNuO9Yi1z Hr1jfnKG05EXC01rQqbk6XXpuALzxPM1fa00eYINSztvSN5PiIFV0Mv9DUg0WMdd nMvhDtxgAaXzypvwip9yCVYWlZt81xy48Xsokm5p6sewhqsxPlzfKT10o2P02q9L FuI1HbEYKzmUgsgCyGdOTZyzeQjGSXQBmcBn6mVUDYWW+TUZkg5z7cw2X1Q3ctsL 4ir96yUkB9pkffaWq8vVZkvaLR8YdJwU3+MW3e7spn3BA1GZWn2dgZcQp12YsJo/ J9tXNSxxHt4yP/5yTdNaIqzkIyClbOuZcMIrsoIsjaacP8xJf9pwKBcS+GrguNaL RyR4harnm2oBEiJBsU3+ev0Cc/+0wWWn4G+eSp7yqlXzWlfyA17UCKJ5NTdPX296 IVb7Zgw05GSRYKL8PX4GPqUlt32wouX6h3z9CPz5p/KSPgJyvfRvRBPwwOU6FGeg C1Q4wPCSsi9wNMo/yK4MvCCh2/9KNsTN8BALZ59mkUcCLXqXskM= =HduY -----END PGP SIGNATURE----- --/JbFNL/QYtAoocgb--