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=RU12PD52; 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 AEF715A0282 for ; Mon, 23 Jun 2025 13:06:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1750676800; 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=8LeM8dMTpDID8XHDDu287vjxWieihMg3aH7gKt4gZ28=; b=RU12PD52DrgwtikHctNhMIhJTATOrOxJJKFF9nuIZ+/vt3UzMKx3heYFTcvSKLnvZFP58b jdXG6b7PJ29MQZDbvcORvJ6E4l9qE6sxgd+cTWfsGZ4zW27q8WaOJYDk8q2CLhJSFwBFWW kJiZsneJBL6h+1+DCrfSM+a9jqMacSI= Received: from mx-prod-mc-04.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-504-ipXGz_u2M46iTvrdtgG7zQ-1; Mon, 23 Jun 2025 07:06:39 -0400 X-MC-Unique: ipXGz_u2M46iTvrdtgG7zQ-1 X-Mimecast-MFC-AGG-ID: ipXGz_u2M46iTvrdtgG7zQ_1750676798 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6C33119560B3 for ; Mon, 23 Jun 2025 11:06:38 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.224.132]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5956919560A3; Mon, 23 Jun 2025 11:06:37 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v7 00/31] Introduce discontiguous frames management Date: Mon, 23 Jun 2025 13:06:04 +0200 Message-ID: <20250623110635.1478625-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xsCJSUjeryZlr39GFsaqXnOckPp4UwhSEuKUcpWteEU_1750676798 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4FEVEWLW5GYXBN35OMIWFI2GHKC7G25M X-Message-ID-Hash: 4FEVEWLW5GYXBN35OMIWFI2GHKC7G25M 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 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 (31):=0D style: Fix 'Return' comment style=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: add memory regions information into pool=0D packet: use buf to store iovec array=0D =0D arp.c | 86 ++++++++++++-------=0D arp.h | 2 +-=0D checksum.c | 4 +-=0D conf.c | 12 +--=0D dhcp.c | 48 ++++++-----=0D dhcp.h | 2 +-=0D dhcpv6.c | 223 +++++++++++++++++++++++++++++++-------------------=0D dhcpv6.h | 2 +-=0D flow.c | 4 +-=0D flow_table.h | 2 +-=0D icmp.c | 43 ++++++----=0D icmp.h | 2 +-=0D inany.c | 4 +-=0D iov.c | 118 ++++++++++++++++++++++----=0D iov.h | 58 +++++++++----=0D ip.c | 32 ++++----=0D ip.h | 3 +-=0D lineread.c | 2 +-=0D ndp.c | 16 +++-=0D ndp.h | 4 +-=0D packet.c | 227 ++++++++++++++++++++++++++++++++++++++-------------=0D packet.h | 57 ++++++-------=0D pcap.c | 1 +=0D tap.c | 134 +++++++++++++++++-------------=0D tap.h | 8 +-=0D tcp.c | 67 ++++++++++-----=0D tcp_buf.c | 2 +-=0D tcp_splice.c | 4 +-=0D tcp_vu.c | 4 +-=0D udp.c | 37 ++++++---=0D udp_vu.c | 6 +-=0D util.c | 6 +-=0D util.h | 4 +-=0D vhost_user.c | 72 ++++++++--------=0D virtio.c | 6 +-=0D virtio.h | 24 ++++--=0D vu_common.c | 48 ++++-------=0D 37 files changed, 870 insertions(+), 504 deletions(-)=0D =0D --=20=0D 2.49.0=0D =0D