Commit 459a2b37 authored by Jason Xing's avatar Jason Xing Committed by Jakub Kicinski

tcp: rstreason: fully support in tcp_ack()

Based on the existing skb drop reason, updating the rstreason map can
help us finish the rstreason job in this function.
Signed-off-by: default avatarJason Xing <kernelxing@tencent.com>
Link: https://lore.kernel.org/r/20240510122502.27850-3-kerneljasonxing@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2b9669d6
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
FN(NO_SOCKET) \ FN(NO_SOCKET) \
FN(TCP_INVALID_ACK_SEQUENCE) \ FN(TCP_INVALID_ACK_SEQUENCE) \
FN(TCP_RFC7323_PAWS) \ FN(TCP_RFC7323_PAWS) \
FN(TCP_TOO_OLD_ACK) \
FN(TCP_ACK_UNSENT_DATA) \
FN(MPTCP_RST_EUNSPEC) \ FN(MPTCP_RST_EUNSPEC) \
FN(MPTCP_RST_EMPTCP) \ FN(MPTCP_RST_EMPTCP) \
FN(MPTCP_RST_ERESOURCE) \ FN(MPTCP_RST_ERESOURCE) \
...@@ -50,6 +52,13 @@ enum sk_rst_reason { ...@@ -50,6 +52,13 @@ enum sk_rst_reason {
* LINUX_MIB_PAWSESTABREJECTED, LINUX_MIB_PAWSACTIVEREJECTED * LINUX_MIB_PAWSESTABREJECTED, LINUX_MIB_PAWSACTIVEREJECTED
*/ */
SK_RST_REASON_TCP_RFC7323_PAWS, 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: TCP ACK for data we haven't
* sent yet
*/
SK_RST_REASON_TCP_ACK_UNSENT_DATA,
/* Copy from include/uapi/linux/mptcp.h. /* Copy from include/uapi/linux/mptcp.h.
* These reset fields will not be changed since they adhere to * These reset fields will not be changed since they adhere to
...@@ -130,6 +139,10 @@ sk_rst_convert_drop_reason(enum skb_drop_reason reason) ...@@ -130,6 +139,10 @@ sk_rst_convert_drop_reason(enum skb_drop_reason reason)
return SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE; return SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE;
case SKB_DROP_REASON_TCP_RFC7323_PAWS: case SKB_DROP_REASON_TCP_RFC7323_PAWS:
return SK_RST_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: default:
/* If we don't have our own corresponding reason */ /* If we don't have our own corresponding reason */
return SK_RST_REASON_NOT_SPECIFIED; return SK_RST_REASON_NOT_SPECIFIED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment