From 16a9f709b38575f8387a74fc1a40f9439a7f1dd5 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Fri, 19 Apr 2024 15:46:57 +0800 Subject: [PATCH] Revert "mptcp: react scheduler when subflow events pop up" This reverts commit 66f4e87a4e68668fb69f206001997ae5477675d1. --- include/net/tcp.h | 3 --- net/ipv4/tcp_timer.c | 6 +++--- net/mptcp/protocol.c | 21 --------------------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 29a564228a2d0..b935e1ae4caf8 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -349,9 +349,6 @@ void tcp_release_cb(struct sock *sk); void tcp_wfree(struct sk_buff *skb); void tcp_write_timer_handler(struct sock *sk); void tcp_delack_timer_handler(struct sock *sk); -bool retransmits_timed_out(struct sock *sk, - unsigned int boundary, - unsigned int timeout); int tcp_ioctl(struct sock *sk, int cmd, int *karg); enum skb_drop_reason tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb); void tcp_rcv_established(struct sock *sk, struct sk_buff *skb); diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 6673ef832f539..976db57b95d40 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -212,9 +212,9 @@ static unsigned int tcp_model_timeout(struct sock *sk, * after "boundary" unsuccessful, exponentially backed-off * retransmissions with an initial RTO of TCP_RTO_MIN. */ -bool retransmits_timed_out(struct sock *sk, - unsigned int boundary, - unsigned int timeout) +static bool retransmits_timed_out(struct sock *sk, + unsigned int boundary, + unsigned int timeout) { struct tcp_sock *tp = tcp_sk(sk); unsigned int start_ts, delta; diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 7598f251a94f6..0588e658f4ab5 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -480,26 +480,6 @@ static long mptcp_timeout_from_subflow(const struct mptcp_subflow_context *subfl inet_csk(ssk)->icsk_timeout - jiffies : 0; } -static void __mptcp_subflow_timeout(struct sock *sk, struct sock *ssk, long tout) -{ - unsigned int boundary = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_retries1) + 1; - - if (retransmits_timed_out(ssk, boundary, tout)) - __mptcp_check_push(sk, ssk); -} - -static void mptcp_subflow_timeout(struct sock *sk) -{ - struct mptcp_subflow_context *subflow; - - mptcp_for_each_subflow(mptcp_sk(sk), subflow) { - struct sock *ssk = mptcp_subflow_tcp_sock(subflow); - long tout = mptcp_timeout_from_subflow(subflow); - - __mptcp_subflow_timeout(sk, ssk, tout); - } -} - void mptcp_set_timeout(struct sock *sk) { struct mptcp_subflow_context *subflow; @@ -2760,7 +2740,6 @@ static void mptcp_worker(struct work_struct *work) mptcp_check_fastclose(msk); mptcp_pm_nl_work(msk); - mptcp_subflow_timeout(sk); mptcp_check_send_data_fin(sk); mptcp_check_data_fin_ack(sk);