From: Kevin Yang <yyd@google.com>
To: David Miller <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Kevin Yang <yyd@google.com>,
Neal Cardwell <ncardwell@google.com>,
Yuchung Cheng <ycheng@google.com>
Subject: [PATCH net-next 1/2] tcp: derive delack_max with tcp_rto_min helper
Date: Tue, 28 May 2024 17:13:19 +0000 [thread overview]
Message-ID: <20240528171320.1332292-2-yyd@google.com> (raw)
In-Reply-To: <20240528171320.1332292-1-yyd@google.com>
Rto_min now has multiple souces, ordered by preprecedence high to
low: ip route option rto_min, icsk->icsk_rto_min.
When derive delack_max from rto_min, we should not only use ip
route option, but should use tcp_rto_min helper to get the correct
rto_min.
Signed-off-by: Kevin Yang <yyd@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/tcp_output.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 95caf8aaa8be..c90362c1f724 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -4163,16 +4163,9 @@ EXPORT_SYMBOL(tcp_connect);
u32 tcp_delack_max(const struct sock *sk)
{
- const struct dst_entry *dst = __sk_dst_get(sk);
- u32 delack_max = inet_csk(sk)->icsk_delack_max;
-
- if (dst && dst_metric_locked(dst, RTAX_RTO_MIN)) {
- u32 rto_min = dst_metric_rtt(dst, RTAX_RTO_MIN);
- u32 delack_from_rto_min = max_t(int, 1, rto_min - 1);
+ u32 delack_from_rto_min = max_t(int, 1, tcp_rto_min(sk) - 1);
- delack_max = min_t(u32, delack_max, delack_from_rto_min);
- }
- return delack_max;
+ return min_t(u32, inet_csk(sk)->icsk_delack_max, delack_from_rto_min);
}
/* Send out a delayed ack, the caller does the policy checking
--
2.45.1.288.g0e0cd299f1-goog
next prev parent reply other threads:[~2024-05-28 17:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 17:13 [PATCH net-next 0/2] tcp: add sysctl_tcp_rto_min_us Kevin Yang
2024-05-28 17:13 ` Kevin Yang [this message]
2024-05-28 17:13 ` [PATCH net-next 2/2] " Kevin Yang
2024-05-29 23:47 ` Jakub Kicinski
2024-05-29 6:43 ` [PATCH net-next 0/2] " Jason Xing
2024-05-29 6:59 ` Jason Xing
2024-05-29 7:39 ` Eric Dumazet
2024-05-29 7:56 ` Tony Lu
2024-05-29 8:43 ` Jason Xing
2024-05-29 9:23 ` Eric Dumazet
2024-05-29 9:30 ` Jason Xing
2024-05-29 19:56 ` Kevin Yang
2024-05-29 7:21 ` Tony Lu
2024-05-29 8:49 ` Jason Xing
2024-05-30 1:08 ` Tony Lu
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=20240528171320.1332292-2-yyd@google.com \
--to=yyd@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.