aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c14
-rw-r--r--net/ipv4/tcp_output.c5
2 files changed, 11 insertions, 8 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 181b70ebd964..541f26a67ba2 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1188,13 +1188,6 @@ new_segment:
1188 goto wait_for_memory; 1188 goto wait_for_memory;
1189 1189
1190 /* 1190 /*
1191 * All packets are restored as if they have
1192 * already been sent.
1193 */
1194 if (tp->repair)
1195 TCP_SKB_CB(skb)->when = tcp_time_stamp;
1196
1197 /*
1198 * Check whether we can use HW checksum. 1191 * Check whether we can use HW checksum.
1199 */ 1192 */
1200 if (sk->sk_route_caps & NETIF_F_ALL_CSUM) 1193 if (sk->sk_route_caps & NETIF_F_ALL_CSUM)
@@ -1203,6 +1196,13 @@ new_segment:
1203 skb_entail(sk, skb); 1196 skb_entail(sk, skb);
1204 copy = size_goal; 1197 copy = size_goal;
1205 max = size_goal; 1198 max = size_goal;
1199
1200 /* All packets are restored as if they have
1201 * already been sent. skb_mstamp isn't set to
1202 * avoid wrong rtt estimation.
1203 */
1204 if (tp->repair)
1205 TCP_SKB_CB(skb)->sacked |= TCPCB_REPAIRED;
1206 } 1206 }
1207 1207
1208 /* Try to append data to the end of skb. */ 1208 /* Try to append data to the end of skb. */
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index ef4a051de018..ff3f0f75cc6c 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1934,8 +1934,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
1934 tso_segs = tcp_init_tso_segs(sk, skb, mss_now); 1934 tso_segs = tcp_init_tso_segs(sk, skb, mss_now);
1935 BUG_ON(!tso_segs); 1935 BUG_ON(!tso_segs);
1936 1936
1937 if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) 1937 if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) {
1938 /* "when" is used as a start point for the retransmit timer */
1939 TCP_SKB_CB(skb)->when = tcp_time_stamp;
1938 goto repair; /* Skip network transmission */ 1940 goto repair; /* Skip network transmission */
1941 }
1939 1942
1940 cwnd_quota = tcp_cwnd_test(tp, skb); 1943 cwnd_quota = tcp_cwnd_test(tp, skb);
1941 if (!cwnd_quota) { 1944 if (!cwnd_quota) {