From mboxrd@z Thu Jan 1 00:00:00 1970 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 635165A0265 for ; Wed, 26 Oct 2022 14:57:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666789078; 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=YQzVS0SyyZa3/FIuBrqpJ4sSNeJ70U2s/mNakmG2NYo=; b=WeWWTqelwJ6VYZts84nAVrAPUGGRInQVGcjin/DSmepQqvYQ6oKsdaWEcjGQNQ6uxdVVP3 rNtjqZrVC+ZfxciC8o94DZNFMV1+fdOFZQIB9QqMawl5IMyPZMZgVHMjHxMtZocsHhCCxc 8F2wYXxSEP2+QUwltrCm8kDXpH92hw4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-70-rwhz96G6PgS4-nxqYb_jww-1; Wed, 26 Oct 2022 08:57:54 -0400 X-MC-Unique: rwhz96G6PgS4-nxqYb_jww-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 85176800B23; Wed, 26 Oct 2022 12:57:54 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-31.brq.redhat.com [10.40.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5729C1415117; Wed, 26 Oct 2022 12:57:54 +0000 (UTC) Date: Wed, 26 Oct 2022 14:57:50 +0200 From: Stefano Brivio To: Paul Holzinger Subject: Re: [PATCH] checksum: Fix calculation for ICMP checksum on IPv4 Message-ID: <20221026145750.49fd26da@elisabeth> In-Reply-To: References: <20221025160713.1024373-1-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FGKI7YMOYZSMYARMBCEPPM6FYXHPWBND X-Message-ID-Hash: FGKI7YMOYZSMYARMBCEPPM6FYXHPWBND 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: David Gibson , passt-dev@passt.top X-Mailman-Version: 3.3.3 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: Hi Paul, On Wed, 26 Oct 2022 14:44:23 +0200 Paul Holzinger wrote: > Hi, > > thanks for the quick patch. I can confirm that it works but there is still > an issue. Thanks for having a look! > The first ICMP package is always dropped: > > $ podman run --net=pasta alpine ping -c 2 192.168.188.1 > PING 192.168.188.1 (192.168.188.1): 56 data bytes > 64 bytes from 192.168.188.1: seq=1 ttl=42 time=0.550 ms > > --- 192.168.188.1 ping statistics --- > 2 packets transmitted, 1 packets received, 50% packet loss > round-trip min/avg/max = 0.550/0.550/0.550 ms > > This is a problem in pasta (it works from my host and with slirp4nents), I > also see the reply on the host with tcpdump: > listening on enp9s0u2u1u2, link-type EN10MB (Ethernet), snapshot length > 262144 bytes > 14:41:09.457147 IP 192.168.188.22 > 192.168.188.1: ICMP echo request, id > 31, seq 0, length 64 > 14:41:09.457481 IP 192.168.188.1 > 192.168.188.22: ICMP echo reply, id 31, > seq 0, length 64 > 14:41:10.456972 IP 192.168.188.22 > 192.168.188.1: ICMP echo request, id > 31, seq 1, length 64 > 14:41:10.457339 IP 192.168.188.1 > 192.168.188.22: ICMP echo reply, id 31, > seq 1, length 64 This difference is due to the fact that pasta allows any IP address to be used by the container, and it will learn that on the first packet. I see the same exact behaviour. We might be able to improve this, but I'm not entirely sure. To make sure I have the right "problem" in mind, would you mind sharing a packet capture (including ARP requests) from the container side? That would be --net=pasta,-p,your.pcap. Thanks, -- Stefano