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=B5+PdaBv; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 42B4D5A004E for ; Wed, 02 Oct 2024 16:32:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727879565; 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: in-reply-to:in-reply-to:references:references; bh=BCFKkB5aEsIkjrzjIKT/+lEvaW0eeOWQNIa1cFR49TI=; b=B5+PdaBvGFCSnOxBNDz7Vix9h4NwIIttmg/RRMYMSYuXKLg3KcZ25s2uOxJ3wC0PMlCvmC sXqhsnDKejzCTY/w6WjIPAgrIrzgWLbpj0qGx73W6iIUTjmvakW0Mb86ojtSEQNF/aPMNK CvQjoXUIbBkrCeU6NfTbiTmDgBdGfB0= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-Fwl_WDWbO9uoS_JGNIwW5A-1; Wed, 02 Oct 2024 10:32:43 -0400 X-MC-Unique: Fwl_WDWbO9uoS_JGNIwW5A-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37cd08d3678so430247f8f.1 for ; Wed, 02 Oct 2024 07:32:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727879562; x=1728484362; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BCFKkB5aEsIkjrzjIKT/+lEvaW0eeOWQNIa1cFR49TI=; b=WGXyJXY5vHUdYtxqJ2y+UIlaFmxTsOFL38l/asoRDJ3EdAshzvuR9R1gk/q6zEA4Bm ws2qaR1cSuKQtZr9FsnqcpTxHhS0ldnAaIRz+i/i9PF/lyqTSMrLks0LPtTafjiDPfZD Rit8Fyzaur+8Eqa+cPSzjlaRvLtcKgm/yF8gHl9DfZwq4dRREEnaHhlwWsg0PpnEBKA/ GbWLH6aGkLPz/khp+tn2fw3L8SLesotS2aUg/oFD1rUtSQxaP9jv1pxEvV5mj6B37p7S 4GE+gWw9rV3966F2CmSOZCoTkO1IyAzqyyrRc7jiq3nRgdDrBiI8d3MMTg3Hwh2Uv8eD 5flA== X-Gm-Message-State: AOJu0Yx3l8NckGaJiTlMKVoJW51dIHBWjEJ769c3jAj/opw9bA8IT/Nu I8mS2QwJBdrixDAdW3hBt6qdEGnoiUzSaxNHYnvkYktawmF6T/yUl3Eryj4tYhLQjFJPfS3oHfH oEgGHBTwGVizB6ygwCA+2RPrx+lToEkI/hxKa2xh+X3vgfCh/GBoFsTUG4fYe4BIPon4LGCMD7n rvf4FG8C9OKEUrPdMz0fE0SxY2r8dOIAtG X-Received: by 2002:a05:6000:1e4e:b0:37c:ccba:8c93 with SMTP id ffacd0b85a97d-37cfb9d2154mr2146049f8f.11.1727879561994; Wed, 02 Oct 2024 07:32:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhQMKXHycXJmHypPxbzUObnfIRnDLQsgyifP+xuwcU65byTe5u0udbiITDb/BDzIQlmiKsvQ== X-Received: by 2002:a05:6000:1e4e:b0:37c:ccba:8c93 with SMTP id ffacd0b85a97d-37cfb9d2154mr2146029f8f.11.1727879561492; Wed, 02 Oct 2024 07:32:41 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd575e322sm14021783f8f.110.2024.10.02.07.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 07:32:40 -0700 (PDT) Date: Wed, 2 Oct 2024 16:32:38 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v5 0/5] tcp: use csum_iov() in tcp_update_check_tcp[4|6]() Message-ID: <20241002163238.1778ed19@elisabeth> In-Reply-To: <20240927135349.675850-1-lvivier@redhat.com> References: <20240927135349.675850-1-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 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: 6XEPHELHRO5RQLQ5DE6V3CPL3CMATGG3 X-Message-ID-Hash: 6XEPHELHRO5RQLQ5DE6V3CPL3CMATGG3 X-MailFrom: sbrivio@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: passt-dev@passt.top 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: On Fri, 27 Sep 2024 15:53:44 +0200 Laurent Vivier wrote: > For vhost-user, we will need to spread TCP payload over > several buffers. To re-use tcp_update_check_tcp[4|6](), > provide an iovec rather than a pointer to a buffer. >=20 > This series updates also csum_iov() and pcap_iov() to > add an offset of bytes to skip in the iovec array. >=20 > It's based on top of "tcp: Use tcp_payload_t rather than tcphdr" that > is added in the series for convenience. >=20 > v3 adds "udp: Update UDP checksum using an iovec array" that modifies > csum_udp4() and csum_udp6() in the same way. >=20 > Laurent Vivier (5): > tcp: Use tcp_payload_t rather than tcphdr > pcap: Add an offset argument in pcap_iov() > checksum: Add an offset argument in csum_iov() > tcp: Update TCP checksum using an iovec array > udp: Update UDP checksum using an iovec array I *think* something in this series causes two test failures. I wasn't able to reproduce them without this series (tried five times), but I don't always reproduce them with it (tried about 10 times, I didn't get any failure for 3 runs, one or both in the other runs). The first one looks like this (copy and paste to a buffer to see it): -- ns$ ip -j -4 addr show|jq -rM '.[] | select(.ifname =3D=3D "enp9s0").addr_i= nfo[0].local' =E2=94= =82...passed. 88.198.0.164 = =E2=94=82 ns$ ip -j -4 route show|jq -rM '.[] | select(.dst =3D=3D "default").gateway= ' =E2=94= =82Starting test: TCP/IPv4: ns to host (spliced): big transfer 88.198.0.161 = =E2=94=82? = cmp /home/sbrivio/passt/test/big.bin /tmp/passt-tests-Fe5Kr9/pasta/tcp/test= _big.bin ns$ ip -j link show | jq -rM '.[] | select(.ifname =3D=3D "enp9s0").mtu' = =E2=94= =82...passed. 65520 = =E2=94=82 ns$ /sbin/dhclient -6 --no-pid enp9s0 = =E2=94=82St= arting test: TCP/IPv4: ns to host (via tap): big transfer ns$ ip -j -6 addr show|jq -rM '[.[] | select(.ifname =3D=3D "enp9s0").addr_= info[] | select(.prefixlen =3D=3D 128).local] | .[0]' =E2= =94=82? cmp /home/sbrivio/passt/test/big.bin /tmp/passt-tests-Fe5Kr9/pasta/= tcp/test_big.bin 2a01:4f8:222:904::2 = =E2=94=82..= .passed. ns$ ip -j -6 route show|jq -rM '.[] | select(.dst =3D=3D "default").gateway= ' =E2=94= =82 fe80::1 = =E2=94=82St= arting test: TCP/IPv4: host to ns (spliced): small transfer ns$ which socat ip jq >/dev/null = =E2=94=82? = cmp /home/sbrivio/passt/test/small.bin /tmp/passt-tests-Fe5Kr9/pasta/tcp/te= st_ns_small.bin ns$ socat -u TCP4-LISTEN:10002 OPEN:/tmp/passt-tests-Fe5Kr9/pasta/tcp/test_= ns_big.bin,create,trunc =E2=94=82..= .passed. ns$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP4:127.0.0.1:10003 = =E2=94=82 ns$ ip -j -4 route show|jq -rM '.[] | select(.dst =3D=3D "default").gateway= ' =E2=94= =82Starting test: TCP/IPv4: ns to host (spliced): small transfer 88.198.0.161 = =E2=94=82? = cmp /home/sbrivio/passt/test/small.bin /tmp/passt-tests-Fe5Kr9/pasta/tcp/te= st_small.bin ns$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP4:88.198.0.161:10003 = =E2=94=82..= .passed. ns$ socat -u TCP4-LISTEN:10002 OPEN:/tmp/passt-tests-Fe5Kr9/pasta/tcp/test_= ns_small.bin,create,trunc =E2=94=82 ns$ socat OPEN:/home/sbrivio/passt/test/small.bin TCP4:127.0.0.1:10003 = =E2=94=82St= arting test: TCP/IPv4: ns to host (via tap): small transfer ns$ ip -j -4 route show|jq -rM '.[] | select(.dst =3D=3D "default").gateway= ' =E2=94= =82? cmp /home/sbrivio/passt/test/small.bin /tmp/passt-tests-Fe5Kr9/pasta/t= cp/test_small.bin 88.198.0.161 = =E2=94=82..= .passed. ns$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP4:88.198.0.161:1000= 3 =E2=94=82 ns$ socat -u TCP6-LISTEN:10002 OPEN:/tmp/passt-tests-Fe5Kr9/pasta/tcp/test_= ns_big.bin,create,trunc =E2=94=82St= arting test: TCP/IPv6: host to ns (spliced): big transfer = =E2=94=82 =E2=94=80=E2=94=80namespace=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=B4=E2=94=80=E2= =94=80pasta/tcp [7/12] - TCP/IPv6: host to ns (spliced): big transfer=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 host$ ip -j -6 route show|jq -rM '[.[] | select(.dst =3D=3D "default").gate= way] | .[0]' =E2=94=82 router: 88.19= 8.0.161 fe80::1 = =E2=94=82DNS: host$ which ip jq >/dev/null = =E2=94=82 185.12.64.1 host$ ip -j -4 addr show|jq -rM '.[] | select(.ifname =3D=3D "enp9s0").addr= _info[0].local' =E2=94=82 185.12.64.2 88.198.0.164 = =E2=94=82 NAT to host ::1: = fe80::1 host$ ip -j -4 route show|jq -rM '[.[] | select(.dst =3D=3D "default").gate= way] | .[0]' =E2=94=82NDP/DHCPv6: 88.198.0.161 = =E2=94=82 assign: 2a01:4f8:= 222:904::2 host$ ip -j -6 route show|jq -rM '[.[] | select(.dst =3D=3D "default").dev]= | .[0]' =E2=94=82 router: fe80:= :1 enp9s0 = =E2=94=82 our link-local: f= e80::1 host$ ip -j -6 addr show|jq -rM '[.[] | select(.ifname =3D=3D "enp9s0").add= r_info[] | select(.scope =3D=3D "global" and .depreca=E2=94=82DNS: ted !=3D true).local] | .[0]' = =E2=94=82 2a01:4ff:ff00::= add:2 2a01:4f8:222:904::2 = =E2=94=82 2a01:4ff:ff00::ad= d:1 host$ ip -j -6 route show|jq -rM '[.[] | select(.dst =3D=3D "default").gate= way] | .[0]' =E2=94=82NDP: received RS,= sending RA fe80::1 = =E2=94=82DHCP: offer to discov= er host$ which socat ip jq >/dev/null = =E2=94=82 from 06:91:e7:c0:= 12:b1 host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP4:127.0.0.1:10002 = =E2=94=82DHCP: ack to request host$ socat -u TCP4-LISTEN:10003,bind=3D127.0.0.1 OPEN:/tmp/passt-tests-Fe5= Kr9/pasta/tcp/test_big.bin,create,trunc =E2=94=82 from 06:91:e7:c= 0:12:b1 host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-Fe5Kr9/pasta/tcp/tes= t_big.bin,create,trunc =E2=94=82DHCPv6: received SOLI= CIT, sending ADVERTISE host$ socat OPEN:/home/sbrivio/passt/test/small.bin TCP4:127.0.0.1:10002 = =E2=94=82DHCPv6: received REQU= EST/RENEW/CONFIRM, sending REPLY host$ socat -u TCP4-LISTEN:10003,bind=3D127.0.0.1 OPEN:/tmp/passt-tests-Fe5= Kr9/pasta/tcp/test_small.bin,create,trunc =E2=94=82NDP: received NS, s= ending NA host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-Fe5Kr9/pasta/tcp/tes= t_small.bin,create,trunc =E2=94=82NDP: received NS, sen= ding NA host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[::1]:10002 = =E2=94=82NDP: received NS, sen= ding NA host$ = =E2=94=82 =E2=94=80=E2=94=80host=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=B4=E2=94=80=E2=94=80pasta=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Testing commit: 3195dc6 udp: Update UDP checksum using an iovec array = = PASS: 23 | FAIL: 0 | 2024-10-02= T13:53:46+00:00 -- the second one is a UDP transfer in the pasta_podman/bats test (mismatch in received data) for which I just accidentally lost the logs... but I'll try to reproduce that again in a bit and share them. --=20 Stefano