aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-03-05 14:29:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-03-05 14:29:24 -0500
commit547046141f44dba075207fd343e3e032e129c9ac (patch)
tree3979961d838def5efa9f3835d19e05d60b3b4d88 /net/ipv4/tcp_input.c
parent661e50bc853209e41a5c14a290ca4decc43cbfd1 (diff)
parenta7f0fb1bfb66ded5d556d6723d691b77a7146b6f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Use an appropriate TSQ pacing shift in mac80211, from Toke Høiland-Jørgensen. 2) Just like ipv4's ip_route_me_harder(), we have to use skb_to_full_sk in ip6_route_me_harder, from Eric Dumazet. 3) Fix several shutdown races and similar other problems in l2tp, from James Chapman. 4) Handle missing XDP flush properly in tuntap, for real this time. From Jason Wang. 5) Out-of-bounds access in powerpc ebpf tailcalls, from Daniel Borkmann. 6) Fix phy_resume() locking, from Andrew Lunn. 7) IFLA_MTU values are ignored on newlink for some tunnel types, fix from Xin Long. 8) Revert F-RTO middle box workarounds, they only handle one dimension of the problem. From Yuchung Cheng. 9) Fix socket refcounting in RDS, from Ka-Cheong Poon. 10) Don't allow ppp unit registration to an unregistered channel, from Guillaume Nault. 11) Various hv_netvsc fixes from Stephen Hemminger. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (98 commits) hv_netvsc: propagate rx filters to VF hv_netvsc: filter multicast/broadcast hv_netvsc: defer queue selection to VF hv_netvsc: use napi_schedule_irqoff hv_netvsc: fix race in napi poll when rescheduling hv_netvsc: cancel subchannel setup before halting device hv_netvsc: fix error unwind handling if vmbus_open fails hv_netvsc: only wake transmit queue if link is up hv_netvsc: avoid retry on send during shutdown virtio-net: re enable XDP_REDIRECT for mergeable buffer ppp: prevent unregistered channels from connecting to PPP units tc-testing: skbmod: fix match value of ethertype mlxsw: spectrum_switchdev: Check success of FDB add operation net: make skb_gso_*_seglen functions private net: xfrm: use skb_gso_validate_network_len() to check gso sizes net: sched: tbf: handle GSO_BY_FRAGS case in enqueue net: rename skb_gso_validate_mtu -> skb_gso_validate_network_len rds: Incorrect reference counting in TCP socket creation net: ethtool: don't ignore return from driver get_fecparam method vrf: check forwarding on the original netdevice when generating ICMP dest unreachable ...
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 575d3c1fb6e8..9a1b3c1c1c14 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1971,11 +1971,6 @@ void tcp_enter_loss(struct sock *sk)
1971 /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous 1971 /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous
1972 * loss recovery is underway except recurring timeout(s) on 1972 * loss recovery is underway except recurring timeout(s) on
1973 * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing 1973 * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing
1974 *
1975 * In theory F-RTO can be used repeatedly during loss recovery.
1976 * In practice this interacts badly with broken middle-boxes that
1977 * falsely raise the receive window, which results in repeated
1978 * timeouts and stop-and-go behavior.
1979 */ 1974 */
1980 tp->frto = net->ipv4.sysctl_tcp_frto && 1975 tp->frto = net->ipv4.sysctl_tcp_frto &&
1981 (new_recovery || icsk->icsk_retransmits) && 1976 (new_recovery || icsk->icsk_retransmits) &&
@@ -2631,18 +2626,14 @@ static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack,
2631 tcp_try_undo_loss(sk, false)) 2626 tcp_try_undo_loss(sk, false))
2632 return; 2627 return;
2633 2628
2634 /* The ACK (s)acks some never-retransmitted data meaning not all
2635 * the data packets before the timeout were lost. Therefore we
2636 * undo the congestion window and state. This is essentially
2637 * the operation in F-RTO (RFC5682 section 3.1 step 3.b). Since
2638 * a retransmitted skb is permantly marked, we can apply such an
2639 * operation even if F-RTO was not used.
2640 */
2641 if ((flag & FLAG_ORIG_SACK_ACKED) &&
2642 tcp_try_undo_loss(sk, tp->undo_marker))
2643 return;
2644
2645 if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */ 2629 if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */
2630 /* Step 3.b. A timeout is spurious if not all data are
2631 * lost, i.e., never-retransmitted data are (s)acked.
2632 */
2633 if ((flag & FLAG_ORIG_SACK_ACKED) &&
2634 tcp_try_undo_loss(sk, true))
2635 return;
2636
2646 if (after(tp->snd_nxt, tp->high_seq)) { 2637 if (after(tp->snd_nxt, tp->high_seq)) {
2647 if (flag & FLAG_DATA_SACKED || is_dupack) 2638 if (flag & FLAG_DATA_SACKED || is_dupack)
2648 tp->frto = 0; /* Step 3.a. loss was real */ 2639 tp->frto = 0; /* Step 3.a. loss was real */
@@ -4001,6 +3992,7 @@ void tcp_reset(struct sock *sk)
4001 /* This barrier is coupled with smp_rmb() in tcp_poll() */ 3992 /* This barrier is coupled with smp_rmb() in tcp_poll() */
4002 smp_wmb(); 3993 smp_wmb();
4003 3994
3995 tcp_write_queue_purge(sk);
4004 tcp_done(sk); 3996 tcp_done(sk);
4005 3997
4006 if (!sock_flag(sk, SOCK_DEAD)) 3998 if (!sock_flag(sk, SOCK_DEAD))