aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-07 04:32:44 -0500
committerIngo Molnar <mingo@kernel.org>2017-11-07 04:32:44 -0500
commit8c5db92a705d9e2c986adec475980d1120fa07b4 (patch)
tree9f0eea56889819707c0a1a8eb5b1fb2db3cdaf3d /net/ipv4/tcp_output.c
parentca5d376e17072c1b60c3fee66f3be58ef018952d (diff)
parente4880bc5dfb1f02b152e62a894b5c6f3e995b3cf (diff)
Merge branch 'linus' into locking/core, to resolve conflicts
Conflicts: include/linux/compiler-clang.h include/linux/compiler-gcc.h include/linux/compiler-intel.h include/uapi/linux/stddef.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 48531da1aba6..5a42e873d44a 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -739,8 +739,10 @@ static void tcp_tsq_handler(struct sock *sk)
739 struct tcp_sock *tp = tcp_sk(sk); 739 struct tcp_sock *tp = tcp_sk(sk);
740 740
741 if (tp->lost_out > tp->retrans_out && 741 if (tp->lost_out > tp->retrans_out &&
742 tp->snd_cwnd > tcp_packets_in_flight(tp)) 742 tp->snd_cwnd > tcp_packets_in_flight(tp)) {
743 tcp_mstamp_refresh(tp);
743 tcp_xmit_retransmit_queue(sk); 744 tcp_xmit_retransmit_queue(sk);
745 }
744 746
745 tcp_write_xmit(sk, tcp_current_mss(sk), tp->nonagle, 747 tcp_write_xmit(sk, tcp_current_mss(sk), tp->nonagle,
746 0, GFP_ATOMIC); 748 0, GFP_ATOMIC);
@@ -2060,6 +2062,7 @@ static int tcp_mtu_probe(struct sock *sk)
2060 nskb->ip_summed = skb->ip_summed; 2062 nskb->ip_summed = skb->ip_summed;
2061 2063
2062 tcp_insert_write_queue_before(nskb, skb, sk); 2064 tcp_insert_write_queue_before(nskb, skb, sk);
2065 tcp_highest_sack_replace(sk, skb, nskb);
2063 2066
2064 len = 0; 2067 len = 0;
2065 tcp_for_write_queue_from_safe(skb, next, sk) { 2068 tcp_for_write_queue_from_safe(skb, next, sk) {
@@ -2237,6 +2240,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
2237 2240
2238 sent_pkts = 0; 2241 sent_pkts = 0;
2239 2242
2243 tcp_mstamp_refresh(tp);
2240 if (!push_one) { 2244 if (!push_one) {
2241 /* Do MTU probing. */ 2245 /* Do MTU probing. */
2242 result = tcp_mtu_probe(sk); 2246 result = tcp_mtu_probe(sk);
@@ -2248,7 +2252,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
2248 } 2252 }
2249 2253
2250 max_segs = tcp_tso_segs(sk, mss_now); 2254 max_segs = tcp_tso_segs(sk, mss_now);
2251 tcp_mstamp_refresh(tp);
2252 while ((skb = tcp_send_head(sk))) { 2255 while ((skb = tcp_send_head(sk))) {
2253 unsigned int limit; 2256 unsigned int limit;
2254 2257
@@ -2663,7 +2666,7 @@ static bool tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
2663 else if (!skb_shift(skb, next_skb, next_skb_size)) 2666 else if (!skb_shift(skb, next_skb, next_skb_size))
2664 return false; 2667 return false;
2665 } 2668 }
2666 tcp_highest_sack_combine(sk, next_skb, skb); 2669 tcp_highest_sack_replace(sk, next_skb, skb);
2667 2670
2668 tcp_unlink_write_queue(next_skb, sk); 2671 tcp_unlink_write_queue(next_skb, sk);
2669 2672
@@ -2841,8 +2844,10 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
2841 nskb = __pskb_copy(skb, MAX_TCP_HEADER, GFP_ATOMIC); 2844 nskb = __pskb_copy(skb, MAX_TCP_HEADER, GFP_ATOMIC);
2842 err = nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) : 2845 err = nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) :
2843 -ENOBUFS; 2846 -ENOBUFS;
2844 if (!err) 2847 if (!err) {
2845 skb->skb_mstamp = tp->tcp_mstamp; 2848 skb->skb_mstamp = tp->tcp_mstamp;
2849 tcp_rate_skb_sent(sk, skb);
2850 }
2846 } else { 2851 } else {
2847 err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC); 2852 err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);
2848 } 2853 }
@@ -3175,13 +3180,8 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
3175 th->source = htons(ireq->ir_num); 3180 th->source = htons(ireq->ir_num);
3176 th->dest = ireq->ir_rmt_port; 3181 th->dest = ireq->ir_rmt_port;
3177 skb->mark = ireq->ir_mark; 3182 skb->mark = ireq->ir_mark;
3178 /* Setting of flags are superfluous here for callers (and ECE is 3183 skb->ip_summed = CHECKSUM_PARTIAL;
3179 * not even correctly set) 3184 th->seq = htonl(tcp_rsk(req)->snt_isn);
3180 */
3181 tcp_init_nondata_skb(skb, tcp_rsk(req)->snt_isn,
3182 TCPHDR_SYN | TCPHDR_ACK);
3183
3184 th->seq = htonl(TCP_SKB_CB(skb)->seq);
3185 /* XXX data is queued and acked as is. No buffer/window check */ 3185 /* XXX data is queued and acked as is. No buffer/window check */
3186 th->ack_seq = htonl(tcp_rsk(req)->rcv_nxt); 3186 th->ack_seq = htonl(tcp_rsk(req)->rcv_nxt);
3187 3187