netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <kerneljasonxing@gmail.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
	<edumazet@google.com>, <kernelxing@tencent.com>,
	<kuba@kernel.org>, <netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<kuniyu@amazon.com>
Subject: Re: [PATCH net-next 5/6] tcp: rstreason: introduce SK_RST_REASON_TCP_TIMEOUT for active reset
Date: Tue, 30 Jul 2024 13:00:19 -0700	[thread overview]
Message-ID: <20240730200019.93474-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20240730133513.99986-6-kerneljasonxing@gmail.com>

From: Jason Xing <kerneljasonxing@gmail.com>
Date: Tue, 30 Jul 2024 21:35:12 +0800
> From: Jason Xing <kernelxing@tencent.com>
> 
> Only when user sets TCP_USER_TIMEOUT option and there is no left
> chance to proceed, we will send an RST to the other side.
> 
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
> ---
>  include/net/rstreason.h | 7 +++++++
>  net/ipv4/tcp_timer.c    | 2 +-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/rstreason.h b/include/net/rstreason.h
> index fecaa57f1634..ca10aaebd768 100644
> --- a/include/net/rstreason.h
> +++ b/include/net/rstreason.h
> @@ -21,6 +21,7 @@
>  	FN(TCP_ABORT_ON_LINGER)		\
>  	FN(TCP_ABORT_ON_MEMORY)		\
>  	FN(TCP_STATE)			\
> +	FN(TCP_TIMEOUT)			\
>  	FN(MPTCP_RST_EUNSPEC)		\
>  	FN(MPTCP_RST_EMPTCP)		\
>  	FN(MPTCP_RST_ERESOURCE)		\
> @@ -108,6 +109,12 @@ enum sk_rst_reason {
>  	 * Please see RFC 793 for all possible reset conditions
>  	 */
>  	SK_RST_REASON_TCP_STATE,
> +	/**
> +	 * @SK_RST_REASON_TCP_TIMEOUT: time to timeout
> +	 * When user sets TCP_USER_TIMEOUT options and run out of all the
> +	 * chance, we have to reset the connection
> +	 */
> +	SK_RST_REASON_TCP_TIMEOUT,

nit: Maybe SK_RST_REASON_TCP_USER_TIMEOUT ?

It's more user-friendly.

  reply	other threads:[~2024-07-30 20:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 13:35 [PATCH net-next 0/6] tcp: completely support active reset Jason Xing
2024-07-30 13:35 ` [PATCH net-next 1/6] tcp: rstreason: introduce SK_RST_REASON_TCP_ABORT_ON_CLOSE for " Jason Xing
2024-07-30 13:35 ` [PATCH net-next 2/6] tcp: rstreason: introduce SK_RST_REASON_TCP_ABORT_ON_LINGER " Jason Xing
2024-07-30 13:35 ` [PATCH net-next 3/6] tcp: rstreason: introduce SK_RST_REASON_TCP_ABORT_ON_MEMORY " Jason Xing
2024-07-30 13:35 ` [PATCH net-next 4/6] tcp: rstreason: introduce SK_RST_REASON_TCP_STATE " Jason Xing
2024-07-30 20:06   ` Kuniyuki Iwashima
2024-07-31  0:02     ` Jason Xing
2024-07-30 13:35 ` [PATCH net-next 5/6] tcp: rstreason: introduce SK_RST_REASON_TCP_TIMEOUT " Jason Xing
2024-07-30 20:00   ` Kuniyuki Iwashima [this message]
2024-07-31  0:09     ` Jason Xing
2024-07-30 13:35 ` [PATCH net-next 6/6] tcp: rstreason: let it work finally in tcp_send_active_reset() Jason Xing

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=20240730200019.93474-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kerneljasonxing@gmail.com \
    --cc=kernelxing@tencent.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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.
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).