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=LIkjnWA/; 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 F25C15A0265 for ; Wed, 20 May 2026 17:10:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779289814; 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=ANB/ogaIQOns1zgMmXoQJCqnbMu8n1B6rRZ03NWnoeY=; b=LIkjnWA/39KesJso408R3NzodIieQnGqADjEDxltxFXFjuZ4uOMxr1W2whqmam4AZy775T 5eOTQg8+oLgS+4hVbHePTWLS3p2BEd5ZduJW6FTqEpiONs3MG5XI72CyUPZTd8hl7sBEw3 MirOqYJaO4h3pA2GnKBSA/ABRi1rVyA= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-IjVvePEWPzuS6WMrBYBF5w-1; Wed, 20 May 2026 11:10:13 -0400 X-MC-Unique: IjVvePEWPzuS6WMrBYBF5w-1 X-Mimecast-MFC-AGG-ID: IjVvePEWPzuS6WMrBYBF5w_1779289812 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 76E441955EB4 for ; Wed, 20 May 2026 15:10:12 +0000 (UTC) Received: from lenovo-t14s.redhat.corp (headnet01.pony-001.prod.iad2.dc.redhat.com [10.2.32.101]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AB33430002DF; Wed, 20 May 2026 15:10:11 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v7 0/4] vhost-user,tcp: Handle multiple iovec entries per virtqueue element Date: Wed, 20 May 2026 17:10:06 +0200 Message-ID: <20260520151010.496286-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: W1P-3c7byBNB990l0SRsLDEpBbnisAlMOtWuNO3BaJA_1779289812 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-ID-Hash: GYQPVA45OLN5TJB54RX5NPW43FO6ZGI4 X-Message-ID-Hash: GYQPVA45OLN5TJB54RX5NPW43FO6ZGI4 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: 20260520095526.21519-1-lvivier@redhat.com v7: - Use initializers for struct tcphdr - Rename reused 'payload' variable to 'l2frame' - Fix vu_pad() double-offset bug in tcp_vu_data_from_sock() - Remove redundant *elem_used = 0 before truncation loop - Add missing @vnlen to tcp_vu_send_dup() doc comment v6: - Rebase on v8 of UDP series (tcp_update_csum() takes dlen rather than l4len) v5: - Use l2len variable for pcap_iov() length in tcp_vu_send_flag() - Add braces - Move pcap_iov() before vu_flush() - Remove vu_flush() from tcp_vu_send_dup(), let the caller handle it v4: - fix error during rebase, 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 | 409 +++++++++++++++++++++++++++++-------------------- vu_common.h | 20 --- 6 files changed, 272 insertions(+), 213 deletions(-) -- 2.54.0