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=GyCanQKk; 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 BB7E15A026F for ; Fri, 17 Oct 2025 08:28:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760682535; 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=tphlMztI8NWb0OsDOfrle3+tYunX2CiZbeo8u/JsaQA=; b=GyCanQKkYWGHKH0JWepcOlnkaTkx1me0+neAxzcBqZUWGWxhlPWUP5HzCZ9Ea3RxXhiUlo FrJ8EP1KP99kH6qO5to0fOjSY/m8qQIpZGMAZoTFa3iMxYKfIru+FfZ6PYOpDOAFa3xiGx dEoK+ZXOV8yN4rd5nfi/JW24dTpUFIU= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-320-yiPlYSHaOWCJa7n0I-L86Q-1; Fri, 17 Oct 2025 02:28:52 -0400 X-MC-Unique: yiPlYSHaOWCJa7n0I-L86Q-1 X-Mimecast-MFC-AGG-ID: yiPlYSHaOWCJa7n0I-L86Q_1760682531 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BBD3B18009C2; Fri, 17 Oct 2025 06:28:50 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.112.60]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D5951956056; Fri, 17 Oct 2025 06:28:46 +0000 (UTC) From: Yumei Huang To: passt-dev@passt.top, sbrivio@redhat.com Subject: [PATCH v6 0/4] Retry SYNs for inbound connections Date: Fri, 17 Oct 2025 14:28:34 +0800 Message-ID: <20251017062838.21041-1-yuhuang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: amzftqxTe_MeC8-jQ3k5rEisCGMKre-WLf4lwApNwU8_1760682531 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 7B24V7XRZLXJL773PWZQVITNCRUJFTIW X-Message-ID-Hash: 7B24V7XRZLXJL773PWZQVITNCRUJFTIW X-MailFrom: yuhuang@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.dropbear.id.au, yuhuang@redhat.com 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: When a client connects, SYN would be sent to guest only once. If the guest is not connected or ready at that time, the connection will be reset in 10s. These patches introduce the SYN retry mechanism using the similar backoff timeout as linux kernel. Also update the data retransmission timeout using the backoff timeout. Yumei Huang (4): tcp: Rename "retrans" to "retries" util: Introduce read_file() and read_file_integer() function tcp: Resend SYN for inbound connections tcp: Update data retransmission timeout tcp.c | 76 +++++++++++++++++++++++++++++++++++------------- tcp.h | 5 ++++ tcp_conn.h | 12 ++++---- util.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ util.h | 8 ++++++ 5 files changed, 159 insertions(+), 26 deletions(-) -- 2.47.0