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=LC1iiIqk; 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 0EA7F5A0271 for ; Tue, 05 Aug 2025 17:46:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754408794; 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=tWL6zQv/277EB8NWsGA3NF76OkZR/5h7nGJ15mWt42s=; b=LC1iiIqk6dl84OBjmzMrdqsVYZ5hg8oRjn4MT8MaHr//d5MVCYrfcNddO+oqHgqq5i8pkA 0l4iLN9cDkbya1nLUavE/AhTjBl6WBGRfzORZX2qbFrAiD/MX1AeznA4YcoXxRbWq8gMnJ 778UDgRpHJOEU/TQ2JwBh1m2uKTaFwM= Received: from mx-prod-mc-02.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-586-_85eLkh4M0W4F1R8fiPZWQ-1; Tue, 05 Aug 2025 11:46:32 -0400 X-MC-Unique: _85eLkh4M0W4F1R8fiPZWQ-1 X-Mimecast-MFC-AGG-ID: _85eLkh4M0W4F1R8fiPZWQ_1754408791 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 89A611956094 for ; Tue, 5 Aug 2025 15:46:31 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.225.81]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 555FA1956094; Tue, 5 Aug 2025 15:46:30 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v8 00/30] Introduce discontiguous frames management Date: Tue, 5 Aug 2025 17:45:58 +0200 Message-ID: <20250805154628.301343-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 3SeuD5b9yOYZcG4dH-8SdZzn7wZq1cz0jZnw859NY6Q_1754408791 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BPA4GC7UXUQO6YSZH2TJZPAPWLZSMNWX X-Message-ID-Hash: BPA4GC7UXUQO6YSZH2TJZPAPWLZSMNWX 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 series introduces iov_tail to convey frame information=0D between functions.=0D =0D This is only an API change, for the moment the memory pool=0D is only able to store contiguous buffer, so, except for=0D vhost-user in a special case, we only play with iovec array=0D with only one entry.=0D =0D v8:=0D - rebase=0D - rework the two last patches to store the iovec in the p->pkt array=0D =0D v7:=0D - Add a patch to fix comment style of 'Return:'=0D - Fix ignore_arp()/accept_arp()=0D - Fix coverity error=0D - Fix several comments=0D =0D v6:=0D - Replaced iov_slice() with the clearer iov_tail_clone()=0D for creating iovec subsets.=0D - Standardized local header variable names (to *_storage suffix).=0D - Renamed functions for better semantics (e.g., ignore_arp to=0D accept_arp, packet_data to packet_get).=0D - Corrected OPTLEN_MAX definition in TCP.=0D - Addressed minor logic issues (e.g., DHCPv6 FQDN flags, NDP null check= ).=0D - Updated ipv6_l4hdr() return type to boolean.=0D - Improved comments and documentation across several modules.=0D =0D v5:=0D - store in the pool iovec array with several entries=0D =0D v4:=0D Prepare to introduce iovec array in the pool:=0D - passe iov_tail rather than pool to ndp,icmp, dhcp, dhcpv6 and arp=0D - remove unused pool macros=0D - add memory regions in the pool structure, this will allow us to use= =0D the buf pointer to store the iovec array for vhost-user=0D =0D v3:=0D Address comments from David=0D =0D Laurent Vivier (30):=0D arp: Don't mix incoming and outgoing buffers=0D iov: Introduce iov_tail_clone() and iov_tail_drop().=0D iov: Update IOV_REMOVE_HEADER() and IOV_PEEK_HEADER()=0D tap: Use iov_tail with tap_add_packet()=0D packet: Use iov_tail with packet_add()=0D packet: Add packet_data()=0D arp: Convert to iov_tail=0D ndp: Convert to iov_tail=0D icmp: Convert to iov_tail=0D udp: Convert to iov_tail=0D tcp: Convert tcp_tap_handler() to use iov_tail=0D tcp: Convert tcp_data_from_tap() to use iov_tail=0D dhcpv6: move offset initialization out of dhcpv6_opt()=0D dhcpv6: Extract sending of NotOnLink status=0D dhcpv6: Convert to iov_tail=0D dhcpv6: Use iov_tail in dhcpv6_opt()=0D dhcp: Convert to iov_tail=0D ip: Use iov_tail in ipv6_l4hdr()=0D tap: Convert tap4_handler() to iov_tail=0D tap: Convert tap6_handler() to iov_tail=0D packet: rename packet_data() to packet_get()=0D arp: use iov_tail rather than pool=0D dhcp: use iov_tail rather than pool=0D dhcpv6: use iov_tail rather than pool=0D icmp: use iov_tail rather than pool=0D ndp: use iov_tail rather than pool=0D packet: remove PACKET_POOL() and PACKET_POOL_P()=0D packet: remove unused parameter from PACKET_POOL_DECL()=0D packet: Refactor vhost-user memory region handling=0D packet: Add support for multi-vector packets=0D =0D arp.c | 86 +++++++++++++-------=0D arp.h | 2 +-=0D dhcp.c | 48 ++++++-----=0D dhcp.h | 2 +-=0D dhcpv6.c | 223 +++++++++++++++++++++++++++++++--------------------=0D dhcpv6.h | 2 +-=0D icmp.c | 41 ++++++----=0D icmp.h | 2 +-=0D iov.c | 102 ++++++++++++++++++++---=0D iov.h | 58 ++++++++++----=0D ip.c | 32 ++++----=0D ip.h | 3 +-=0D ndp.c | 16 +++-=0D ndp.h | 4 +-=0D packet.c | 139 +++++++++++++++++---------------=0D packet.h | 45 ++++-------=0D pcap.c | 1 +=0D tap.c | 119 +++++++++++++++------------=0D tap.h | 4 +-=0D tcp.c | 61 +++++++++-----=0D tcp_buf.c | 2 +-=0D udp.c | 33 +++++---=0D vhost_user.c | 28 +++----=0D virtio.c | 4 +-=0D virtio.h | 18 ++++-=0D vu_common.c | 48 ++++-------=0D 26 files changed, 689 insertions(+), 434 deletions(-)=0D =0D --=20=0D 2.49.0=0D =0D