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=Um4larFD; 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 ESMTPS id 171B75A0276 for ; Tue, 02 Dec 2025 04:00:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764644419; 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=aCn98YiJQyKrPQTcdkHMkKD2748Bb/aoUPsH6qhJBYo=; b=Um4larFDYqWqyRYvg+/aF9ED53pVu52WRw/BGXVYK/g49aB2LdNUicI4767DwuVcvfrxNi zcxahiG6ygZKNYpLh5QsD4bsro6hNGEjMJkFSms6xud+7QB5vQnUh10q4EBJ1VGZLQY7Cm 8ADHmNRQg2DtDUjtoLoTP8aufUWVsRQ= Received: from mx-prod-mc-05.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-441-vRoxnwXIOPea0FaFeqLUlg-1; Mon, 01 Dec 2025 22:00:16 -0500 X-MC-Unique: vRoxnwXIOPea0FaFeqLUlg-1 X-Mimecast-MFC-AGG-ID: vRoxnwXIOPea0FaFeqLUlg_1764644416 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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 81CD31956096; Tue, 2 Dec 2025 03:00:15 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.72.116.175]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C53E1956095; Tue, 2 Dec 2025 03:00:10 +0000 (UTC) From: Yumei Huang To: passt-dev@passt.top, sbrivio@redhat.com Subject: [PATCH v10 0/5] Retry SYNs for inbound connections Date: Tue, 2 Dec 2025 11:00:02 +0800 Message-ID: <20251202030007.23581-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: g0wVWzXg1P5f2MSRE2Yyu8g7M6ssghzczqj2Vg5Vw6M_1764644416 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: WSGMKCPPYCBHFRDPLNVPDDZDAUGJMXJE X-Message-ID-Hash: WSGMKCPPYCBHFRDPLNVPDDZDAUGJMXJE 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. v10: - Update read_file() to check buf_size first - Improve debug message in read_file_integer() - Replace RTO_MAX_MS_DEFAULT with RTO_MAX_DEFAULT - Wording fixes v9: - Squash the patch of adding parameter c to tcp_timer_ctl() into the later one - Fix the cppcheck error - Update the return values of read_file(), remove the error message of it and add check for buf_size - Rename RTO_INIT_ACK to RTO_INIT_AFTER_SYN_RETRIES - Round up rto_max, fix the conversion in subtraction - Some other minor fixes related to wording v8: - Remove the TCP_/tcp_ suffix from certain macro and struct member names - Add parameter struct ctx *c to tcp_timer_ctl() - Modify rto_max type from size_t to int - Clamp syn_retries and syn_linear_timeouts with MAX_SYNCNT(127) - Some other minor fixes related to wording and formatting v7: - Update read_file() and read_file_integer() - Rename tcp_syn_params_init() to tcp_get_rto_params() - Modify the implementation of the timeout assignment - Add a patch to clamp the retry timeout Yumei Huang (5): 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: Clamp the retry timeout tcp.c | 107 +++++++++++++++++++++++++++++++++++++++-------------- tcp.h | 6 +++ tcp_conn.h | 13 ++++--- util.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ util.h | 1 + 5 files changed, 185 insertions(+), 33 deletions(-) -- 2.51.1