From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BTCniI/F; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 708155A0262 for ; Wed, 01 Apr 2026 23:55:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775080512; 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; bh=CYKmJxXK7Gw74qJhjqQMycmhfG7ld7ZWfT/wPeQCQcw=; b=BTCniI/Fi2bxoeJfUm5bMSSJSwcYldCU1KHzExmnq00aDmzwgSFPvyJCpxJ3SNnLxM1JLd 0sWysXLK18VOytcimXuGhzj65zVwv4HASnWLhYu63360hixTaFa72EBqoT7TLW8Row5Poq tDmWvJMcc2ocrok9smu/B0wufABIY+E= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-TedUUcspMmivNIOhVbHOPA-1; Wed, 01 Apr 2026 17:55:11 -0400 X-MC-Unique: TedUUcspMmivNIOhVbHOPA-1 X-Mimecast-MFC-AGG-ID: TedUUcspMmivNIOhVbHOPA_1775080510 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6A420180044D for ; Wed, 1 Apr 2026 21:55:10 +0000 (UTC) Received: from lenovo-t14s.redhat.corp (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A28A0180036E; Wed, 1 Apr 2026 21:55:09 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v4 0/4] vhost-user,tcp: Handle multiple iovec entries per virtqueue element Date: Wed, 1 Apr 2026 23:55:04 +0200 Message-ID: <20260401215508.2149752-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Jy0w-ovzPMXpznSTN-TAsUrJNe0LQV9QU0Q36N_IQik_1775080510 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-ID-Hash: CH23VRE72PFPXXLFRW7HNCCJT7Q2KRDD X-Message-ID-Hash: CH23VRE72PFPXXLFRW7HNCCJT7Q2KRDD 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: This is the TCP counterpart to the UDP multi-iov series. It converts the TCP vhost-user receive path from direct pointer arithmetic (via vu_eth(), vu_ip(), etc.) to the iov_tail abstraction, removing the assumption that all headers reside in a single contiguous buffer. With this series applied, the TCP path correctly handles virtio-net drivers that provide multiple buffers per virtqueue element (e.g. iPXE provides the vnet header in the first buffer and the frame payload in a second one), matching the support already present in the UDP path. Based-on: 20260401192326.1783350-1-lvivier@redhat.com v4: - fix error during rebasei, s/vu_pad_len/vu_pad/ v3: - Rebased on top of [PATCH 00/10] vhost-user: Preparatory series for multiple iovec entries per virtqueue element v2: - add "tcp: Encode checksum computation flags in a single parameter" - remove IOV_PUT_HEADER()/with_header() and use IOV_PUSH_HEADER() - don't use the iov_tail to provide the headers to the functions Laurent Vivier (4): tcp: Encode checksum computation flags in a single parameter tcp_vu: Build headers on the stack and write them into the iovec tcp_vu: Support multibuffer frames in tcp_vu_sock_recv() tcp_vu: Support multibuffer frames in tcp_vu_send_flag() iov.c | 1 - tcp.c | 25 ++-- tcp_buf.c | 23 +-- tcp_internal.h | 7 +- tcp_vu.c | 395 +++++++++++++++++++++++++++++-------------------- vu_common.h | 20 --- 6 files changed, 265 insertions(+), 206 deletions(-) -- 2.53.0