Re: [PATCH net-next v7 1/7] net: introduce rstreason to detect why the RST is sent

2024-04-23 Thread Jason Xing
On Tue, Apr 23, 2024 at 7:57 PM Simon Horman wrote: > > On Tue, Apr 23, 2024 at 10:17:31AM +0800, Jason Xing wrote: > > On Tue, Apr 23, 2024 at 10:14 AM Jason Xing > > wrote: > > > > > > Hi Simon, > > > > > > On Tue, Apr 23, 2024 at 2:28 AM Simon Horman wrote: > > > > > > > > On Mon, Apr 22,

Re: [PATCH net-next v7 1/7] net: introduce rstreason to detect why the RST is sent

2024-04-23 Thread Simon Horman
On Tue, Apr 23, 2024 at 10:17:31AM +0800, Jason Xing wrote: > On Tue, Apr 23, 2024 at 10:14 AM Jason Xing wrote: > > > > Hi Simon, > > > > On Tue, Apr 23, 2024 at 2:28 AM Simon Horman wrote: > > > > > > On Mon, Apr 22, 2024 at 11:01:03AM +0800, Jason Xing wrote: > > > > > > ... > > > > > > >

Re: [PATCH net-next v8 5/7] mptcp: support rstreason for passive reset

2024-04-23 Thread Jason Xing
Hello Matthieu, On Tue, Apr 23, 2024 at 6:02 PM Matthieu Baerts wrote: > > Hi Jason, > > On 23/04/2024 09:21, Jason Xing wrote: > > From: Jason Xing > > > > It relys on what reset options in the skb are as rfc8684 says. Reusing > > (if you have something else to fix, 'checkpatch.pl --codespell'

Re: [PATCH net-next v8 6/7] mptcp: introducing a helper into active reset logic

2024-04-23 Thread Matthieu Baerts
Hi Jason, On 23/04/2024 09:21, Jason Xing wrote: > From: Jason Xing > > Since we have mapped every mptcp reset reason definition in enum > sk_rst_reason, introducing a new helper can cover some missing places > where we have already set the subflow->reset_reason. > > Note: using

Re: [PATCH net-next v8 5/7] mptcp: support rstreason for passive reset

2024-04-23 Thread Matthieu Baerts
Hi Jason, On 23/04/2024 09:21, Jason Xing wrote: > From: Jason Xing > > It relys on what reset options in the skb are as rfc8684 says. Reusing (if you have something else to fix, 'checkpatch.pl --codespell' reported a warning here: s/relys/relies/) > this logic can save us much energy. This

Re: [PATCH net-next v8 3/7] rstreason: prepare for active reset

2024-04-23 Thread Matthieu Baerts
Hi Jason, On 23/04/2024 09:21, Jason Xing wrote: > From: Jason Xing > > Like what we did to passive reset: > only passing possible reset reason in each active reset path. > > No functional changes. (...) > net/mptcp/protocol.c | 4 +++- > net/mptcp/subflow.c | 5 +++-- For the

Re: [PATCH net-next v8 2/7] rstreason: prepare for passive reset

2024-04-23 Thread Matthieu Baerts
Hi Jason, On 23/04/2024 09:21, Jason Xing wrote: > From: Jason Xing > > Adjust the parameter and support passing reason of reset which > is for now NOT_SPECIFIED. No functional changes. (...) > net/mptcp/subflow.c| 8 +--- For the modifications in MPTCP: Acked-by: Matthieu

Re: [PATCH net-next v8 1/7] net: introduce rstreason to detect why the RST is sent

2024-04-23 Thread Matthieu Baerts
Hi Jason, On 23/04/2024 09:21, Jason Xing wrote: > From: Jason Xing > > Add a new standalone file for the easy future extension to support > both active reset and passive reset in the TCP/DCCP/MPTCP protocols. > > This patch only does the preparations for reset reason mechanism, > nothing else

[PATCH net-next v8 7/7] rstreason: make it work in trace world

2024-04-23 Thread Jason Xing
From: Jason Xing At last, we should let it work by introducing this reset reason in trace world. One of the possible expected outputs is: ... tcp_send_reset: skbaddr=xxx skaddr=xxx src=xxx dest=xxx state=TCP_ESTABLISHED reason=NOT_SPECIFIED Signed-off-by: Jason Xing Reviewed-by: Steven

[PATCH net-next v8 6/7] mptcp: introducing a helper into active reset logic

2024-04-23 Thread Jason Xing
From: Jason Xing Since we have mapped every mptcp reset reason definition in enum sk_rst_reason, introducing a new helper can cover some missing places where we have already set the subflow->reset_reason. Note: using SK_RST_REASON_NOT_SPECIFIED is the same as SK_RST_REASON_MPTCP_RST_EUNSPEC.

[PATCH net-next v8 5/7] mptcp: support rstreason for passive reset

2024-04-23 Thread Jason Xing
From: Jason Xing It relys on what reset options in the skb are as rfc8684 says. Reusing this logic can save us much energy. This patch replaces most of the prior NOT_SPECIFIED reasons. Signed-off-by: Jason Xing --- net/mptcp/protocol.h | 28 net/mptcp/subflow.c |

[PATCH net-next v8 4/7] tcp: support rstreason for passive reset

2024-04-23 Thread Jason Xing
From: Jason Xing Reuse the dropreason logic to show the exact reason of tcp reset, so we can finally display the corresponding item in enum sk_reset_reason instead of reinventing new reset reasons. This patch replaces all the prior NOT_SPECIFIED reasons. Signed-off-by: Jason Xing ---

[PATCH net-next v8 3/7] rstreason: prepare for active reset

2024-04-23 Thread Jason Xing
From: Jason Xing Like what we did to passive reset: only passing possible reset reason in each active reset path. No functional changes. Signed-off-by: Jason Xing --- include/net/tcp.h | 3 ++- net/ipv4/tcp.c| 15 ++- net/ipv4/tcp_output.c | 3 ++-

[PATCH net-next v8 1/7] net: introduce rstreason to detect why the RST is sent

2024-04-23 Thread Jason Xing
From: Jason Xing Add a new standalone file for the easy future extension to support both active reset and passive reset in the TCP/DCCP/MPTCP protocols. This patch only does the preparations for reset reason mechanism, nothing else changes. The reset reasons are divided into three parts: 1)

[PATCH net-next v8 2/7] rstreason: prepare for passive reset

2024-04-23 Thread Jason Xing
From: Jason Xing Adjust the parameter and support passing reason of reset which is for now NOT_SPECIFIED. No functional changes. Signed-off-by: Jason Xing --- include/net/request_sock.h | 4 +++- net/dccp/ipv4.c| 10 ++ net/dccp/ipv6.c| 10 ++

[PATCH net-next v8 0/7] Implement reset reason mechanism to detect

2024-04-23 Thread Jason Xing
From: Jason Xing In production, there are so many cases about why the RST skb is sent but we don't have a very convenient/fast method to detect the exact underlying reasons. RST is implemented in two kinds: passive kind (like tcp_v4_send_reset()) and active kind (like tcp_send_active_reset()).