[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVnQy=-0noN4ApLX3pG55_1JVuLa5XKyUJpr0gqNiue6CcCWA@mail.gmail.com>
Date: Wed, 27 May 2020 13:51:07 -0400
From: Neal Cardwell <ncardwell@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net-next 1/2] tcp: add tcp_ld_RTO_revert() helper
On Tue, May 26, 2020 at 10:49 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> RFC 6069 logic has been implemented for IPv4 only so far,
> right in the middle of tcp_v4_err() and was error prone.
>
> Move this code to one helper, to make tcp_v4_err() more
> readable and to eventually expand RFC 6069 to IPv6 in
> the future.
>
> Also perform sock_owned_by_user() check a bit sooner.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
Acked-by: Neal Cardwell <ncardwell@...gle.com>
Tested-by: Neal Cardwell <ncardwell@...gle.com>
Nice clean-up. Thanks, Eric! It will be great to have IPv6 RFC 6069
support as well.
thanks,
neal
ps: Tested with the packetdrill script below earlier this morning to
verify that IPv4 RFC 6069 works before and after Eric's patch. Eric
independently wrote a nicer test this morning.
// Establish a connection.
0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0
+0 < S 0:0(0) win 32792 <mss 1460,nop,wscale 7>
+0 > S. 0:0(0) ack 1 <mss 1460,nop,wscale 8>
+.010 < . 1:1(0) ack 1 win 257
+0 accept(3, ..., ...) = 4
// Send 10 data segments.
+0 write(4, ..., 14600) = 14600
+0 > P. 1:14601(14600) ack 1
// ICMP says that the network is unreachable
+.010 < icmp unreachable net_unreachable [1:1461(1460)]
// RTO retransmit.
+.216 > . 1:1461(1460) ack 1
+.010 < icmp unreachable net_unreachable [1:1461(1460)]
// RTO retransmit, without exponential backoff.
+.216 > . 1:1461(1460) ack 1
+.010 < icmp unreachable net_unreachable [1:1461(1460)]
// RTO retransmit, without exponential backoff.
+.216 > . 1:1461(1460) ack 1
+.010 < icmp unreachable net_unreachable [1:1461(1460)]
Powered by blists - more mailing lists