From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.145.221.124]) by passt.top (Postfix) with ESMTP id 47EFC5A0262 for ; Mon, 27 Mar 2023 11:15:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679908549; 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=jaXz2+LHkKINsnbv7bBs8o9jj72YYyOSY8DtlwmmqiE=; b=QCtYcFBcfZWM7crx3TXmDSY5yqplPWmV9x7IwFa+IkN1bKIw+ypAbrejolTz8r4AmfyHHx ugrdg5zaOzL74VKKeYUlOK2sxuu8Urht3skpTTjJLtTD1/hl2okCmNFMephjqUl50Wz2X+ Q70AcXC6G7wRnho8oNsjm5WdpGWoZZg= 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-2-mQ5pEqWsPEKuS48sir4Naw-1; Mon, 27 Mar 2023 05:15:47 -0400 X-MC-Unique: mQ5pEqWsPEKuS48sir4Naw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 53A3A101A54F; Mon, 27 Mar 2023 09:15:47 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D5A51121330; Mon, 27 Mar 2023 09:15:47 +0000 (UTC) Date: Mon, 27 Mar 2023 11:15:28 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/2] tcp: Correct handling of first ACK (or SYN-ACK) packet Message-ID: <20230327111528.58c483f9@elisabeth> In-Reply-To: <20230327035634.1432064-1-david@gibson.dropbear.id.au> References: <20230327035634.1432064-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: BIVBSIZHRZ5ZI5KLZR2ZZUHLKPYXDG7Z X-Message-ID-Hash: BIVBSIZHRZ5ZI5KLZR2ZZUHLKPYXDG7Z 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 Mon, 27 Mar 2023 14:56:32 +1100 David Gibson wrote: > We have a subtle problem in the handling of the very first ack-flagged > packet (either the SYN-ACK or ACK from the three way handshake). > Stefano has posted a couple of versions of a patch addressing this, > however I think this is a better approach. From the TCP logical point > of view, that first ACK does advance the sequence number, and if we > treat it as doing so, then the logic we already had in > tcp_update_seqack_from_tap() is correct. > > David Gibson (2): > tcp: Clarify allowed state for tcp_data_from_tap() > tcp: Don't special case the handling of the ack of a syn Thanks for fixing this, the series looks good to me. I'm wondering if we should still apply the v2 of the patch I sent, with an adjusted commit message, because resetting ACK_FROM_TAP_DUE only on SEQ_GT(seq, conn->seq_ack_from_tap) doesn't really follow any logic, even though it wouldn't be a problem at this point. -- Stefano