netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: Neal Cardwell <ncardwell@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	 Yuchung Cheng <ycheng@google.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v1 net-next 3/6] tcp: Remove redundant init for req->num_timeout.
Date: Fri, 7 Nov 2025 00:37:05 -0800	[thread overview]
Message-ID: <CANn89i+CntWvmzsSVOzUDTw4Cb0cf3-83C8Y7ByPxD7iN38vtw@mail.gmail.com> (raw)
In-Reply-To: <20251106003357.273403-4-kuniyu@google.com>

On Wed, Nov 5, 2025 at 4:34 PM Kuniyuki Iwashima <kuniyu@google.com> wrote:
>
> Commit 5903123f662e ("tcp: Use BPF timeout setting for SYN ACK
> RTO") introduced req->timeout and initialised it in 3 places:
>
>   1. reqsk_alloc() sets 0
>   2. inet_reqsk_alloc() sets TCP_TIMEOUT_INIT
>   3. tcp_conn_request() sets tcp_timeout_init()
>
> 1. has been always redundant as 2. overwrites it immediately.
>
> 2. was necessary for TFO SYN+ACK but is no longer needed after
> commit 8ea731d4c2ce ("tcp: Make SYN ACK RTO tunable by BPF
> programs with TFO").
>
> 3. was moved to reqsk_queue_hash_req() in the previous patch.
>
> Now, we always initialise req->timeout just before scheduling
> the SYN+ACK timer:
>
>   * For non-TFO SYN+ACK : reqsk_queue_hash_req()
>   * For TFO SYN+ACK     : tcp_fastopen_create_child()
>
> Let's remove the redundant initialisation of req->timeout in
> reqsk_alloc() and inet_reqsk_alloc().
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2025-11-07  8:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06  0:32 [PATCH v1 net-next 0/6] tcp: Clean up SYN+ACK RTO code and apply max RTO Kuniyuki Iwashima
2025-11-06  0:32 ` [PATCH v1 net-next 1/6] tcp: Call tcp_syn_ack_timeout() directly Kuniyuki Iwashima
2025-11-07  8:00   ` Eric Dumazet
2025-11-06  0:32 ` [PATCH v1 net-next 2/6] tcp: Remove timeout arg from reqsk_queue_hash_req() Kuniyuki Iwashima
2025-11-07  8:03   ` Eric Dumazet
2025-11-06  0:32 ` [PATCH v1 net-next 3/6] tcp: Remove redundant init for req->num_timeout Kuniyuki Iwashima
2025-11-07  8:37   ` Eric Dumazet [this message]
2025-11-06  0:32 ` [PATCH v1 net-next 4/6] tcp: Remove timeout arg from reqsk_timeout() Kuniyuki Iwashima
2025-11-07  8:39   ` Eric Dumazet
2025-11-06  0:32 ` [PATCH v1 net-next 5/6] tcp: Apply max RTO to non-TFO SYN+ACK Kuniyuki Iwashima
2025-11-07  8:41   ` Eric Dumazet
2025-11-06  0:32 ` [PATCH v1 net-next 6/6] selftest: packetdrill: Add max RTO test for SYN+ACK Kuniyuki Iwashima
2025-11-07  8:43   ` Eric Dumazet
2025-11-08  2:20 ` [PATCH v1 net-next 0/6] tcp: Clean up SYN+ACK RTO code and apply max RTO patchwork-bot+netdevbpf

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=CANn89i+CntWvmzsSVOzUDTw4Cb0cf3-83C8Y7ByPxD7iN38vtw@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ycheng@google.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.
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 NNTP newsgroup(s).