Implement reset reason mechanism to detect
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest7 patches 8 repliesApplied 7/7
- v87 patches 7 repliesSuperseded
- v77 patches 9 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 posting 2/2 | 7 patches | 1 reply | Superseded | |
| v6 posting 1/2 | 7 patches | 18 replies | Superseded | |
| v5 | 7 patches | 2 replies | Superseded | |
| v4 | 6 patches | 12 replies | Superseded | |
| v3 | 6 patches | 7 replies | Superseded | |
| v2 | 6 patches | 2 replies | Superseded | |
| v1 | 6 patches | 2 replies | Superseded |
Patches in v9 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | net: introduce rstreason to detect why the RST is sentinclude/ | +106 | 1 reply | Applied |
| 2/7 | rstreason: prepare for passive resetinclude/ net/ net/ +5 more | +40 | 1 reply | Applied |
| 3/7 | rstreason: prepare for active resetinclude/ net/ net/ +3 more | +26 | 1 reply | Applied |
| 4/7 | tcp: support rstreason for passive resetinclude/ net/ net/ | +29 | 0 replies | Applied |
| 5/7 | mptcp: support rstreason for passive resetnet/ net/ | +44 | 1 reply | Applied |
| 6/7 | mptcp: introducing a helper into active reset logicnet/ net/ net/ | +14 | 1 reply | Applied |
| 7/7 | rstreason: make it work in trace worldinclude/ net/ net/ +1 more | +25 | 1 reply | Applied |
Reviews trailers per patch
6 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Matthieu Baerts (NGI0) | Steven Rostedt (Google) | Eric Dumazet |
|---|---|---|---|
| Series | R-b | ||
| 1/7 | A-b | R-b | |
| 2/7 | A-b | R-b | |
| 3/7 | A-b | R-b | |
| 4/7 | |||
| 5/7 | R-b | R-b | |
| 6/7 | R-b | R-b | |
| 7/7 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH net-next v9 0/7] Implement reset reason mechanism to detect
From: Jason Xing <[email protected]>
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()). The former can be traced carefully 1) in TCP, with the help of drop reasons, which is based on Eric's idea[1], 2) in MPTCP, with the help of reset options defined in RFC 8684. The latter is relatively independent, which should be implemented on our own, such as active reset reasons which can not be replace by skb drop reason or something like this.
In this series, I focus on the fundamental implement mostly about how the rstreason mechanism works and give the detailed passive part as an example, not including the active reset part. In future, we can go further and refine those NOT_SPECIFIED reasons.
Here are some examples when tracing:
<idle>-0 [002] ..s1. 1830.262425: tcp_send_reset: skbaddr=x
skaddr=x src=x dest=x state=x reason=NOT_SPECIFIED
<idle>-0 [002] ..s1. 1830.262425: tcp_send_reset: skbaddr=x
skaddr=x src=x dest=x state=x reason=NO_SOCKET
v9
1. address nit problem (Matt)
2. add acked-by and reviewed-by tags (Matt)
v8
1. put sk reset reasons into more natural order (Matt)
2. adjust those helper position (Matt)
3. rename two convert function (Matt)
4. make the kdoc format correct (Simon)
v7
1. get rid of enum casts which could bring potential issues (Eric)
2. use switch-case method to map between reset reason in MPTCP and sk reset reason (Steven)
3. use switch-case method to map between skb drop reason and sk reset reason
v6
1. add back casts, or else they are treated as error.
v5
1. address format issue (like reverse xmas tree) (Eric, Paolo)
2. remove unnecessary casts. (Eric)
3. introduce a helper used in mptcp active reset. See patch 6. (Paolo)
v4
1. passing 'enum sk_rst_reason' for readability when tracing (Antoine)
v3
1. rebase (mptcp part) and address what Mat suggested.
v2
1. rebase against the latest net-next tree
Jason Xing (7):
net: introduce rstreason to detect why the RST is sent
rstreason: prepare for passive reset
rstreason: prepare for active reset
tcp: support rstreason for passive reset
mptcp: support rstreason for passive reset
mptcp: introducing a helper into active reset logic
rstreason: make it work in trace world
include/net/request_sock.h | 4 +- include/net/rstreason.h | 121 +++++++++++++++++++++++++++++++++++++ include/net/tcp.h | 3 +- include/trace/events/tcp.h | 26 ++++++-- net/dccp/ipv4.c | 10 +-- net/dccp/ipv6.c | 10 +-- net/dccp/minisocks.c | 3 +- net/ipv4/tcp.c | 15 +++-- net/ipv4/tcp_ipv4.c | 17 ++++-- net/ipv4/tcp_minisocks.c | 3 +- net/ipv4/tcp_output.c | 5 +- net/ipv4/tcp_timer.c | 9 ++- net/ipv6/tcp_ipv6.c | 20 +++--- net/mptcp/protocol.c | 2 +- net/mptcp/protocol.h | 38 ++++++++++++ net/mptcp/subflow.c | 27 ++++++--- 16 files changed, 266 insertions(+), 47 deletions(-) create mode 100644 include/net/rstreason.h
Signature · 1 line
2.37.3