From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id CE2445A026D for ; Fri, 9 Feb 2024 06:01:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1707454877; bh=1vvFP5peTUbuIU0QEv877ZiOJFgdq4W3ZNpuH4i6F5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AULitacwLpKp0XEa6Xp7xUbS76iU56CPt7Z1+R4iUQNTDddFG56cdKCbEmNna6y3p RDZnEP8CLKyta1rvzSi9lfPBnXy24pemdqjYtPzCI4LFSgONFDkw277ND/24pozulm 0LylDZ65oqqMVQVX0hOA1DIbdGHaV7e/1dYIhFjuWaDWIrjI/Hh34vN584nZoYMuja BUcDM4MadilD9rl8I6wegqvbwWuuUOkEL0KVNVgA1O4zwDeZXJfV8Ox7BYpT0S+9sX 6FW1oNNQb8Td08ULQUMxkOIdR5r1EfJtWANEzz2tWEYYdwKFkTSCIw9ChAn5nCYlok pV6pwgdgqnZGQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4TWMBj4Mlyz4x1k; Fri, 9 Feb 2024 16:01:17 +1100 (AEDT) Date: Fri, 9 Feb 2024 16:01:12 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 24/24] vhost-user: remove tap_send_frames_vu() Message-ID: References: <20240202141151.3762941-1-lvivier@redhat.com> <20240202141151.3762941-25-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BpV0gYzz0cTPt/+6" Content-Disposition: inline In-Reply-To: <20240202141151.3762941-25-lvivier@redhat.com> Message-ID-Hash: 7HKUFNDVO3R7HEOIE5CF6EJYUHB5YAYZ X-Message-ID-Hash: 7HKUFNDVO3R7HEOIE5CF6EJYUHB5YAYZ 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: --BpV0gYzz0cTPt/+6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 02, 2024 at 03:11:51PM +0100, Laurent Vivier wrote: > As TCP and UDP use now directly vhost-user we don't need this function > anymore. Other protocols (ICMP, ARP, DHCP, ...) use tap_send()/vu_send() >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tap.c | 3 +-- > vhost_user.c | 16 ---------------- > vhost_user.h | 2 -- > 3 files changed, 1 insertion(+), 20 deletions(-) >=20 > diff --git a/tap.c b/tap.c > index 930e48689497..ed1744f72e37 100644 > --- a/tap.c > +++ b/tap.c > @@ -440,8 +440,7 @@ size_t tap_send_frames(const struct ctx *c, const str= uct iovec *iov, size_t n) > m =3D tap_send_frames_passt(c, iov, n); > break; > case MODE_VU: > - m =3D tap_send_frames_vu(c, iov, n); > - break; > + ASSERT(0); > default: > m =3D 0; > break; > diff --git a/vhost_user.c b/vhost_user.c > index 9cc07c8312c0..4ceeeb58f792 100644 > --- a/vhost_user.c > +++ b/vhost_user.c > @@ -653,22 +653,6 @@ err: > return offset; > } > =20 > -size_t tap_send_frames_vu(const struct ctx *c, const struct iovec *iov, = size_t n) > -{ > - size_t i; > - int ret; > - > - debug("tap_send_frames_vu n %zd", n); > - > - for (i =3D 0; i < n; i++) { > - ret =3D vu_send(c, iov[i].iov_base, iov[i].iov_len); > - if (ret < 0) > - break; > - } > - debug("count %zd", i); > - return i; > -} > - > static void vu_handle_tx(VuDev *vdev, int index) > { > struct ctx *c =3D (struct ctx *) ((char *)vdev - offsetof(struct ctx, v= dev)); > diff --git a/vhost_user.h b/vhost_user.h > index 25f0b617ab40..44678ddabef4 100644 > --- a/vhost_user.h > +++ b/vhost_user.h > @@ -129,8 +129,6 @@ static inline bool vu_queue_started(const VuVirtq *vq) > return vq->started; > } > =20 > -size_t tap_send_frames_vu(const struct ctx *c, const struct iovec *iov, > - size_t n); > int vu_send(const struct ctx *c, const void *data, size_t len); > void vu_print_capabilities(void); > void vu_init(struct ctx *c); --=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 --BpV0gYzz0cTPt/+6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmXFsZcACgkQzQJF27ox 2Gd0/w/+NEB5QGhA0XdmOfAMOKHr0CadzO43Vp2TtpsFEIT35qXDIfN8XN+6hykL 4RSV5qiVpBcAfcMiHNIYPmdq9s4IC/eWuQBuympA4Vta8SfxGt2yBDmXHo0QYkJB NrZwdfPA2pqlZ14A9bZBYZubBj2OUJn+anGsSs4m8kQUFAaJ+5vCv1p34AWL/jSp 1t9aF7ucejlUY2Iyv8358AjyauKPkallF/tDyxeA/tqzMIYewbv8voDFWr9gVDRa DM3hLWpreUlssKTNwaEliC0YuCTWRdGp6Ug1pqpKtYkUyz15HMAvAK0On+/TfzXc fC5vDDj/o6K5m8jwdsiI2H/dEXDE2Nw9IVihbpik7c1OHS/1o24rFMo1qT54WFbP f+tEc0Qpj3fqwqSi3LPDGcTeSiRAkTvuJd7KllgUyCft8kfH5N02P0g7AuCbJJtT 6VFRwUZY7D/9I2RvLODzmUD7BIOBsFnZ63esxkjCzaISvW91YieJ7cOPIR8RSVA3 USVm7JXf5A3gjyWxCupYpYI+TpDCu24Ug6nxkafO/V6HNBH/nJDJag48Xy81w9Pv LFRx25e8QBKS+5Q75ezbNR+ciOuW18IqcFagLZboaWW1Q/cbVHuQhRNzZNObxBAb 3qxn3V4urm7nuQ0c1mrZRGlNcpnqvQXgMija1Rr4iLyIVb/Ztvs= =sAvb -----END PGP SIGNATURE----- --BpV0gYzz0cTPt/+6--