netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Xing <kerneljasonxing@gmail.com>
To: David Ahern <dsahern@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	 pabeni@redhat.com, kuniyu@amazon.com, netdev@vger.kernel.org,
	 Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net-next v8 08/10] tcp: add dropreasons in tcp_rcv_state_process()
Date: Fri, 23 Feb 2024 02:11:18 +0800	[thread overview]
Message-ID: <CAL+tcoCbsbM=HyXRqs2+QVrY8FSKmqYC47m87Axiyk1wk4omwQ@mail.gmail.com> (raw)
In-Reply-To: <b053dad4-5745-4b9a-af55-f5c04beb6584@kernel.org>

On Fri, Feb 23, 2024 at 1:28 AM David Ahern <dsahern@kernel.org> wrote:
>
> On 2/22/24 4:30 AM, Jason Xing wrote:
> > @@ -6704,8 +6705,13 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
> >                                 FLAG_NO_CHALLENGE_ACK);
> >
> >       if ((int)reason <= 0) {
> > -             if (sk->sk_state == TCP_SYN_RECV)
> > -                     return 1;       /* send one RST */
> > +             if (sk->sk_state == TCP_SYN_RECV) {
> > +                     /* send one RST */
> > +                     if (!reason)
> > +                             return SKB_DROP_REASON_TCP_OLD_ACK;
> > +                     else
> > +                             return -reason;
>
> checkpatch should be flagging this - the `else` is not needed.

Maybe the way I use the checkpatch script is not right...

>
>                         if (!reason)
>                                 return SKB_DROP_REASON_TCP_OLD_ACK;
>
>                         return -reason;
>
>

Thanks, I will update it.

  reply	other threads:[~2024-02-22 18:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 11:29 [PATCH net-next v8 00/10] introduce drop reasons for tcp receive path Jason Xing
2024-02-22 11:29 ` [PATCH net-next v8 01/10] tcp: add a dropreason definitions and prepare for cookie check Jason Xing
2024-02-22 11:29 ` [PATCH net-next v8 02/10] tcp: directly drop skb in cookie check for ipv4 Jason Xing
2024-02-22 11:29 ` [PATCH net-next v8 03/10] tcp: use drop reasons " Jason Xing
2024-02-22 12:31   ` Eric Dumazet
2024-02-22 11:29 ` [PATCH net-next v8 04/10] tcp: directly drop skb in cookie check for ipv6 Jason Xing
2024-02-22 11:29 ` [PATCH net-next v8 05/10] tcp: use drop reasons " Jason Xing
2024-02-22 11:29 ` [PATCH net-next v8 06/10] tcp: introduce dropreasons in receive path Jason Xing
2024-02-22 12:32   ` Eric Dumazet
2024-02-22 11:30 ` [PATCH net-next v8 07/10] tcp: add more specific possible drop reasons in tcp_rcv_synsent_state_process() Jason Xing
2024-02-22 11:30 ` [PATCH net-next v8 08/10] tcp: add dropreasons in tcp_rcv_state_process() Jason Xing
2024-02-22 17:28   ` David Ahern
2024-02-22 18:11     ` Jason Xing [this message]
2024-02-22 11:30 ` [PATCH net-next v8 09/10] tcp: make the dropreason really work when calling tcp_rcv_state_process() Jason Xing
2024-02-22 11:30 ` [PATCH net-next v8 10/10] tcp: make dropreason in tcp_child_process() work Jason Xing
2024-02-22 12:32   ` Eric Dumazet
2024-02-22 17:31 ` [PATCH net-next v8 00/10] introduce drop reasons for tcp receive path David Ahern

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+tcoCbsbM=HyXRqs2+QVrY8FSKmqYC47m87Axiyk1wk4omwQ@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=kuniyu@amazon.com \
    --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).