From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id EAE725A0298 for ; Fri, 2 Feb 2024 15:12:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706883119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ziOzOCaEUgIkMAf1BKmsyIMq0gC9kmmTnmZ2DI3VcCA=; b=KmEe/Svs8FOTYnpqHHRzhfJMs1iXRW+9653ZX80UG6xPidxSYe+oiFgDT0UAKSys8EnDz/ BRk8sBaQDIX7TiNVCcVuU+tO56elEqnHLwpHGXuicAiAu/E+JCCO1t3XP0inyrn/hbK9UX jN+aTJSZwI4tCIvIOSCZfWtvYZm+t/g= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-235-tktzGv7gNfOrwArdxjRy9A-1; Fri, 02 Feb 2024 09:11:56 -0500 X-MC-Unique: tktzGv7gNfOrwArdxjRy9A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CC8038562E6 for ; Fri, 2 Feb 2024 14:11:56 +0000 (UTC) Received: from virtlab218.virt.lab.eng.bos.redhat.com (virtlab218.virt.lab.eng.bos.redhat.com [10.19.152.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 054323C2E; Fri, 2 Feb 2024 14:11:56 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 24/24] vhost-user: remove tap_send_frames_vu() Date: Fri, 2 Feb 2024 15:11:51 +0100 Message-ID: <20240202141151.3762941-25-lvivier@redhat.com> In-Reply-To: <20240202141151.3762941-1-lvivier@redhat.com> References: <20240202141151.3762941-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 67Y6GUCJQKH3HWU4XLWU62LU4U4L3QZP X-Message-ID-Hash: 67Y6GUCJQKH3HWU4XLWU62LU4U4L3QZP X-MailFrom: lvivier@redhat.com 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: Laurent Vivier 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: 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() Signed-off-by: Laurent Vivier --- tap.c | 3 +-- vhost_user.c | 16 ---------------- vhost_user.h | 2 -- 3 files changed, 1 insertion(+), 20 deletions(-) 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 struct iovec *iov, size_t n) m = tap_send_frames_passt(c, iov, n); break; case MODE_VU: - m = tap_send_frames_vu(c, iov, n); - break; + ASSERT(0); default: m = 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; } -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 = 0; i < n; i++) { - ret = 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 = (struct ctx *) ((char *)vdev - offsetof(struct ctx, vdev)); 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; } -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); -- 2.42.0