public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Yumei Huang <yuhuang@redhat.com>
To: passt-dev@passt.top, sbrivio@redhat.com
Cc: david@gibson.dropbear.id.au, yuhuang@redhat.com
Subject: [PATCH v10 0/5] Retry SYNs for inbound connections
Date: Tue,  2 Dec 2025 11:00:02 +0800	[thread overview]
Message-ID: <20251202030007.23581-1-yuhuang@redhat.com> (raw)

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


             reply	other threads:[~2025-12-02  3:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  3:00 Yumei Huang [this message]
2025-12-02  3:00 ` [PATCH v10 1/5] tcp: Rename "retrans" to "retries" Yumei Huang
2025-12-02  3:00 ` [PATCH v10 2/5] util: Introduce read_file() and read_file_integer() function Yumei Huang
2025-12-02  3:07   ` David Gibson
2025-12-02  3:00 ` [PATCH v10 3/5] tcp: Resend SYN for inbound connections Yumei Huang
2025-12-02  3:19   ` David Gibson
2025-12-02  3:00 ` [PATCH v10 4/5] tcp: Update data retransmission timeout Yumei Huang
2025-12-02  3:00 ` [PATCH v10 5/5] tcp: Clamp the retry timeout Yumei Huang
2025-12-02  3:20   ` David Gibson
2025-12-03  6:33 ` [PATCH v10 0/5] Retry SYNs for inbound connections Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251202030007.23581-1-yuhuang@redhat.com \
    --to=yuhuang@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).