aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h4
-rw-r--r--net/ipv4/tcp.c14
-rw-r--r--net/ipv4/tcp_output.c5
3 files changed, 14 insertions, 9 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index dafa1cbc149b..36f55254573f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -705,8 +705,10 @@ struct tcp_skb_cb {
705#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */ 705#define TCPCB_SACKED_RETRANS 0x02 /* SKB retransmitted */
706#define TCPCB_LOST 0x04 /* SKB is lost */ 706#define TCPCB_LOST 0x04 /* SKB is lost */
707#define TCPCB_TAGBITS 0x07 /* All tag bits */ 707#define TCPCB_TAGBITS 0x07 /* All tag bits */
708#define TCPCB_REPAIRED 0x10 /* SKB repaired (no skb_mstamp) */
708#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ 709#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */
709#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS) 710#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS| \
711 TCPCB_REPAIRED)
710 712
711 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ 713 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
712 /* 1 byte hole */ 714 /* 1 byte hole */
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) {