diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-09 19:28:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-09 19:28:45 -0400 |
commit | 3118e6e19da7b8d76b2456b880c74a9aa3a2268b (patch) | |
tree | 3060d11297c1195ef2d1f120d9c2247b4b1de4ae /net/ipv4/tcp_output.c | |
parent | feca7d8c135bc1527b244fe817b8b6498066ccec (diff) | |
parent | 48fb6f4db940e92cfb16cd878cddd59ea6120d06 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The UDP offload conflict is dealt with by simply taking what is
in net-next where we have removed all of the UFO handling code
entirely.
The TCP conflict was a case of local variables in a function
being removed from both net and net-next.
In netvsc we had an assignment right next to where a missing
set of u64 stats sync object inits were added.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index d49bff51bdb7..3e0d19631534 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2375,23 +2375,14 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
2375 | { | 2375 | { |
2376 | struct inet_connection_sock *icsk = inet_csk(sk); | 2376 | struct inet_connection_sock *icsk = inet_csk(sk); |
2377 | struct tcp_sock *tp = tcp_sk(sk); | 2377 | struct tcp_sock *tp = tcp_sk(sk); |
2378 | u32 timeout, tlp_time_stamp, rto_time_stamp; | 2378 | u32 timeout, rto_delta_us; |
2379 | 2379 | ||
2380 | /* No consecutive loss probes. */ | ||
2381 | if (WARN_ON(icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)) { | ||
2382 | tcp_rearm_rto(sk); | ||
2383 | return false; | ||
2384 | } | ||
2385 | /* Don't do any loss probe on a Fast Open connection before 3WHS | 2380 | /* Don't do any loss probe on a Fast Open connection before 3WHS |
2386 | * finishes. | 2381 | * finishes. |
2387 | */ | 2382 | */ |
2388 | if (tp->fastopen_rsk) | 2383 | if (tp->fastopen_rsk) |
2389 | return false; | 2384 | return false; |
2390 | 2385 | ||
2391 | /* TLP is only scheduled when next timer event is RTO. */ | ||
2392 | if (icsk->icsk_pending != ICSK_TIME_RETRANS) | ||
2393 | return false; | ||
2394 | |||
2395 | /* Schedule a loss probe in 2*RTT for SACK capable connections | 2386 | /* Schedule a loss probe in 2*RTT for SACK capable connections |
2396 | * in Open state, that are either limited by cwnd or application. | 2387 | * in Open state, that are either limited by cwnd or application. |
2397 | */ | 2388 | */ |
@@ -2418,14 +2409,10 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
2418 | timeout = TCP_TIMEOUT_INIT; | 2409 | timeout = TCP_TIMEOUT_INIT; |
2419 | } | 2410 | } |
2420 | 2411 | ||
2421 | /* If RTO is shorter, just schedule TLP in its place. */ | 2412 | /* If the RTO formula yields an earlier time, then use that time. */ |
2422 | tlp_time_stamp = tcp_jiffies32 + timeout; | 2413 | rto_delta_us = tcp_rto_delta_us(sk); /* How far in future is RTO? */ |
2423 | rto_time_stamp = (u32)inet_csk(sk)->icsk_timeout; | 2414 | if (rto_delta_us > 0) |
2424 | if ((s32)(tlp_time_stamp - rto_time_stamp) > 0) { | 2415 | timeout = min_t(u32, timeout, usecs_to_jiffies(rto_delta_us)); |
2425 | s32 delta = rto_time_stamp - tcp_jiffies32; | ||
2426 | if (delta > 0) | ||
2427 | timeout = delta; | ||
2428 | } | ||
2429 | 2416 | ||
2430 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_LOSS_PROBE, timeout, | 2417 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_LOSS_PROBE, timeout, |
2431 | TCP_RTO_MAX); | 2418 | TCP_RTO_MAX); |
@@ -3450,6 +3437,10 @@ int tcp_connect(struct sock *sk) | |||
3450 | int err; | 3437 | int err; |
3451 | 3438 | ||
3452 | tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_CONNECT_CB); | 3439 | tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_CONNECT_CB); |
3440 | |||
3441 | if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk)) | ||
3442 | return -EHOSTUNREACH; /* Routing failure or similar. */ | ||
3443 | |||
3453 | tcp_connect_init(sk); | 3444 | tcp_connect_init(sk); |
3454 | 3445 | ||
3455 | if (unlikely(tp->repair)) { | 3446 | if (unlikely(tp->repair)) { |