From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=JESZbQjc; 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 ESMTP id 04DD85A004F for ; Fri, 27 Sep 2024 15:54:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727445240; 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=mKB3xp16X6Msa1F+Xij+sljcFVjBBsDCjAhzSAEa4SY=; b=JESZbQjc2vN9OtQPz7fdziLmc7VNKFAAFFYSpyiRCOHnTycIqQ6MlgLOLLKKBrBkUKw7uD ZJZxnBw62ggr5I8jLztJQNf0f0K5hoF+qp2EK+qwpk/5ZMKvmaX1qF2L4he0h4oNq0N3vt JVCI1ZH7iYqjSRTffuYHoZK8L07vikA= Received: from mx-prod-mc-01.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-156-sporbb1fOt2-E7EKStiZ8A-1; Fri, 27 Sep 2024 09:53:58 -0400 X-MC-Unique: sporbb1fOt2-E7EKStiZ8A-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.12]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CCAC419781B6 for ; Fri, 27 Sep 2024 13:53:57 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.192.222]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DA7631961773; Fri, 27 Sep 2024 13:53:50 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v5 0/5] tcp: use csum_iov() in tcp_update_check_tcp[4|6]() Date: Fri, 27 Sep 2024 15:53:44 +0200 Message-ID: <20240927135349.675850-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GAUYPU5RFWGUHQBPIOWCNIZ3B5QJZ2QJ X-Message-ID-Hash: GAUYPU5RFWGUHQBPIOWCNIZ3B5QJZ2QJ 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: For vhost-user, we will need to spread TCP payload over=0D several buffers. To re-use tcp_update_check_tcp[4|6](),=0D provide an iovec rather than a pointer to a buffer.=0D =0D This series updates also csum_iov() and pcap_iov() to=0D add an offset of bytes to skip in the iovec array.=0D =0D It's based on top of "tcp: Use tcp_payload_t rather than tcphdr" that=0D is added in the series for convenience.=0D =0D v3 adds "udp: Update UDP checksum using an iovec array" that modifies=0D csum_udp4() and csum_udp6() in the same way.=0D =0D Laurent Vivier (5):=0D tcp: Use tcp_payload_t rather than tcphdr=0D pcap: Add an offset argument in pcap_iov()=0D checksum: Add an offset argument in csum_iov()=0D tcp: Update TCP checksum using an iovec array=0D udp: Update UDP checksum using an iovec array=0D =0D checksum.c | 46 +++++++++++-----=0D checksum.h | 7 +--=0D iov.c | 1 -=0D pcap.c | 5 +-=0D pcap.h | 2 +-=0D tap.c | 14 +++--=0D tap.h | 2 +-=0D tcp.c | 140 +++++++++++++++++++++++++++++++++++++++----------=0D tcp_buf.c | 29 ----------=0D tcp_internal.h | 29 ++++++++++=0D udp.c | 17 ++++--=0D 11 files changed, 206 insertions(+), 86 deletions(-)=0D =0D --=20=0D 2.46.0=0D =0D