Netdev Archive mirror
 help / color / mirror / Atom feed
From: Jason Xing <kerneljasonxing@gmail.com>
To: edumazet@google.com, dsahern@kernel.org, kuba@kernel.org,
	 pabeni@redhat.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net-next 2/5] tcp: fully support sk reset reason in tcp_ack()
Date: Fri, 10 May 2024 10:08:26 +0800	[thread overview]
Message-ID: <CAL+tcoBDWzecSzKXEYG_teg2+8SDDquTagUO8QBYOh8NHW345Q@mail.gmail.com> (raw)
In-Reply-To: <20240509131306.92931-3-kerneljasonxing@gmail.com>

On Thu, May 9, 2024 at 9:13 PM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> From: Jason Xing <kernelxing@tencent.com>
>
> Based on the existing skb drop reason, updating the rstreason map can
> help us finish the rstreason job in this function.
>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
> ---
>  include/net/rstreason.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/include/net/rstreason.h b/include/net/rstreason.h
> index f87814a60205..a32b0fa17de2 100644
> --- a/include/net/rstreason.h
> +++ b/include/net/rstreason.h
> @@ -10,6 +10,8 @@
>         FN(NO_SOCKET)                   \
>         FN(TCP_INVALID_ACK_SEQUENCE)    \
>         FN(TCP_RFC7323_PAWS)            \
> +       FN(TCP_TOO_OLD_ACK)             \
> +       FN(TCP_ACK_UNSENT_DATA)         \
>         FN(MPTCP_RST_EUNSPEC)           \
>         FN(MPTCP_RST_EMPTCP)            \
>         FN(MPTCP_RST_ERESOURCE)         \
> @@ -50,6 +52,10 @@ enum sk_rst_reason {
>          * LINUX_MIB_PAWSESTABREJECTED, LINUX_MIB_PAWSACTIVEREJECTED
>          */
>         SK_RST_REASON_TCP_RFC7323_PAWS,
> +       /** @SK_RST_REASON_TCP_TOO_OLD_ACK: TCP ACK is too old */
> +       SK_RST_REASON_TCP_TOO_OLD_ACK,
> +       /** @SK_RST_REASON_TCP_ACK_UNSENT_DATA */

I'll add the detailed comment into this kdoc which was found by
patchwork in V2 series to make sure every item has its own
explanation.

Thanks,
Jason

> +       SK_RST_REASON_TCP_ACK_UNSENT_DATA,
>
>         /* Copy from include/uapi/linux/mptcp.h.
>          * These reset fields will not be changed since they adhere to
> @@ -130,6 +136,10 @@ sk_rst_convert_drop_reason(enum skb_drop_reason reason)
>                 return SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE;
>         case SKB_DROP_REASON_TCP_RFC7323_PAWS:
>                 return SK_RST_REASON_TCP_RFC7323_PAWS;
> +       case SKB_DROP_REASON_TCP_TOO_OLD_ACK:
> +               return SK_RST_REASON_TCP_TOO_OLD_ACK;
> +       case SKB_DROP_REASON_TCP_ACK_UNSENT_DATA:
> +               return SK_RST_REASON_TCP_ACK_UNSENT_DATA;
>         default:
>                 /* If we don't have our own corresponding reason */
>                 return SK_RST_REASON_NOT_SPECIFIED;
> --
> 2.37.3
>

  reply	other threads:[~2024-05-10  2:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 13:13 [PATCH net-next 0/5] tcp: support rstreasons in the passive logic Jason Xing
2024-05-09 13:13 ` [PATCH net-next 1/5] tcp: fully support sk reset reasons in tcp_rcv_synsent_state_process() Jason Xing
2024-05-09 13:13 ` [PATCH net-next 2/5] tcp: fully support sk reset reason in tcp_ack() Jason Xing
2024-05-10  2:08   ` Jason Xing [this message]
2024-05-09 13:13 ` [PATCH net-next 3/5] tcp: fully support sk reset reason in tcp_rcv_state_process() Jason Xing
2024-05-09 13:13 ` [PATCH net-next 4/5] tcp: handle timewait cases in rstreason logic Jason Xing
2024-05-09 13:13 ` [PATCH net-next 5/5] tcp: handle rstreason in tcp_check_req() 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=CAL+tcoBDWzecSzKXEYG_teg2+8SDDquTagUO8QBYOh8NHW345Q@mail.gmail.com \
    --to=kerneljasonxing@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.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 read-only IMAP folder(s) and NNTP newsgroup(s).