* [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK
@ 2022-04-29 10:32 Pengcheng Yang
2022-04-29 14:55 ` Neal Cardwell
2022-04-30 13:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Pengcheng Yang @ 2022-04-29 10:32 UTC (permalink / raw)
To: Eric Dumazet, Neal Cardwell, netdev
Cc: David S. Miller, Hideaki YOSHIFUJI, Jakub Kicinski, Paolo Abeni,
David Ahern, Pengcheng Yang
This patch doesn't change any functionality.
Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
net/ipv4/tcp_recovery.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
index fd113f6..48f30e7 100644
--- a/net/ipv4/tcp_recovery.c
+++ b/net/ipv4/tcp_recovery.c
@@ -2,11 +2,6 @@
#include <linux/tcp.h>
#include <net/tcp.h>
-static bool tcp_rack_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2)
-{
- return t1 > t2 || (t1 == t2 && after(seq1, seq2));
-}
-
static u32 tcp_rack_reo_wnd(const struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
@@ -77,9 +72,9 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
!(scb->sacked & TCPCB_SACKED_RETRANS))
continue;
- if (!tcp_rack_sent_after(tp->rack.mstamp,
- tcp_skb_timestamp_us(skb),
- tp->rack.end_seq, scb->end_seq))
+ if (!tcp_skb_sent_after(tp->rack.mstamp,
+ tcp_skb_timestamp_us(skb),
+ tp->rack.end_seq, scb->end_seq))
break;
/* A packet is lost if it has not been s/acked beyond
@@ -140,8 +135,8 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
}
tp->rack.advanced = 1;
tp->rack.rtt_us = rtt_us;
- if (tcp_rack_sent_after(xmit_time, tp->rack.mstamp,
- end_seq, tp->rack.end_seq)) {
+ if (tcp_skb_sent_after(xmit_time, tp->rack.mstamp,
+ end_seq, tp->rack.end_seq)) {
tp->rack.mstamp = xmit_time;
tp->rack.end_seq = end_seq;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK
2022-04-29 10:32 [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK Pengcheng Yang
@ 2022-04-29 14:55 ` Neal Cardwell
2022-04-29 15:07 ` Eric Dumazet
2022-04-30 13:00 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Neal Cardwell @ 2022-04-29 14:55 UTC (permalink / raw)
To: Pengcheng Yang
Cc: Eric Dumazet, netdev, David S. Miller, Hideaki YOSHIFUJI,
Jakub Kicinski, Paolo Abeni, David Ahern, Yuchung Cheng
On Fri, Apr 29, 2022 at 6:33 AM Pengcheng Yang <yangpc@wangsu.com> wrote:
>
> This patch doesn't change any functionality.
>
> Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---
> net/ipv4/tcp_recovery.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
> index fd113f6..48f30e7 100644
> --- a/net/ipv4/tcp_recovery.c
> +++ b/net/ipv4/tcp_recovery.c
> @@ -2,11 +2,6 @@
> #include <linux/tcp.h>
> #include <net/tcp.h>
>
> -static bool tcp_rack_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2)
> -{
> - return t1 > t2 || (t1 == t2 && after(seq1, seq2));
> -}
> -
> static u32 tcp_rack_reo_wnd(const struct sock *sk)
> {
> struct tcp_sock *tp = tcp_sk(sk);
> @@ -77,9 +72,9 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
> !(scb->sacked & TCPCB_SACKED_RETRANS))
> continue;
>
> - if (!tcp_rack_sent_after(tp->rack.mstamp,
> - tcp_skb_timestamp_us(skb),
> - tp->rack.end_seq, scb->end_seq))
> + if (!tcp_skb_sent_after(tp->rack.mstamp,
> + tcp_skb_timestamp_us(skb),
> + tp->rack.end_seq, scb->end_seq))
> break;
>
> /* A packet is lost if it has not been s/acked beyond
> @@ -140,8 +135,8 @@ void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
> }
> tp->rack.advanced = 1;
> tp->rack.rtt_us = rtt_us;
> - if (tcp_rack_sent_after(xmit_time, tp->rack.mstamp,
> - end_seq, tp->rack.end_seq)) {
> + if (tcp_skb_sent_after(xmit_time, tp->rack.mstamp,
> + end_seq, tp->rack.end_seq)) {
> tp->rack.mstamp = xmit_time;
> tp->rack.end_seq = end_seq;
> }
> --
Thanks! The patch looks good to me, and passes all our team's packetdrill tests.
Acked-by: Neal Cardwell <ncardwell@google.com>
Tested-by: Neal Cardwell <ncardwell@google.com>
thanks,
neal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK
2022-04-29 14:55 ` Neal Cardwell
@ 2022-04-29 15:07 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2022-04-29 15:07 UTC (permalink / raw)
To: Neal Cardwell
Cc: Pengcheng Yang, netdev, David S. Miller, Hideaki YOSHIFUJI,
Jakub Kicinski, Paolo Abeni, David Ahern, Yuchung Cheng
On Fri, Apr 29, 2022 at 7:55 AM Neal Cardwell <ncardwell@google.com> wrote:
>
> On Fri, Apr 29, 2022 at 6:33 AM Pengcheng Yang <yangpc@wangsu.com> wrote:
> >
> > This patch doesn't change any functionality.
> >
> > Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> > Cc: Neal Cardwell <ncardwell@google.com>
> Acked-by: Neal Cardwell <ncardwell@google.com>
> Tested-by: Neal Cardwell <ncardwell@google.com>
>
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK
2022-04-29 10:32 [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK Pengcheng Yang
2022-04-29 14:55 ` Neal Cardwell
@ 2022-04-30 13:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-30 13:00 UTC (permalink / raw)
To: Pengcheng Yang
Cc: edumazet, ncardwell, netdev, davem, yoshfuji, kuba, pabeni, dsahern
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 29 Apr 2022 18:32:56 +0800 you wrote:
> This patch doesn't change any functionality.
>
> Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---
> net/ipv4/tcp_recovery.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
Here is the summary with links:
- [net-next] tcp: use tcp_skb_sent_after() instead in RACK
https://git.kernel.org/netdev/net-next/c/5a8ad1ce2c60
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-30 13:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 10:32 [PATCH net-next] tcp: use tcp_skb_sent_after() instead in RACK Pengcheng Yang
2022-04-29 14:55 ` Neal Cardwell
2022-04-29 15:07 ` Eric Dumazet
2022-04-30 13:00 ` patchwork-bot+netdevbpf
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.