]>
Commit | Line | Data |
---|---|---|
7a674766 GKH |
1 | From eb473853522f6481d2c933109be2f8236fa8913d Mon Sep 17 00:00:00 2001 |
2 | From: Eric Dumazet <edumazet@google.com> | |
3 | Date: Thu, 23 May 2013 07:44:20 +0000 | |
4 | Subject: tcp: xps: fix reordering issues | |
5 | ||
6 | From: Eric Dumazet <edumazet@google.com> | |
7 | ||
8 | [ Upstream commit 547669d483e5783d722772af1483fa474da7caf9 ] | |
9 | ||
10 | commit 3853b5841c01a ("xps: Improvements in TX queue selection") | |
11 | introduced ooo_okay flag, but the condition to set it is slightly wrong. | |
12 | ||
13 | In our traces, we have seen ACK packets being received out of order, | |
14 | and RST packets sent in response. | |
15 | ||
16 | We should test if we have any packets still in host queue. | |
17 | ||
18 | Signed-off-by: Eric Dumazet <edumazet@google.com> | |
19 | Cc: Tom Herbert <therbert@google.com> | |
20 | Cc: Yuchung Cheng <ycheng@google.com> | |
21 | Cc: Neal Cardwell <ncardwell@google.com> | |
22 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | net/ipv4/tcp_output.c | 10 ++++++---- | |
26 | 1 file changed, 6 insertions(+), 4 deletions(-) | |
27 | ||
28 | --- a/net/ipv4/tcp_output.c | |
29 | +++ b/net/ipv4/tcp_output.c | |
30 | @@ -835,11 +835,13 @@ static int tcp_transmit_skb(struct sock | |
31 | &md5); | |
32 | tcp_header_size = tcp_options_size + sizeof(struct tcphdr); | |
33 | ||
34 | - if (tcp_packets_in_flight(tp) == 0) { | |
35 | + if (tcp_packets_in_flight(tp) == 0) | |
36 | tcp_ca_event(sk, CA_EVENT_TX_START); | |
37 | - skb->ooo_okay = 1; | |
38 | - } else | |
39 | - skb->ooo_okay = 0; | |
40 | + | |
41 | + /* if no packet is in qdisc/device queue, then allow XPS to select | |
42 | + * another queue. | |
43 | + */ | |
44 | + skb->ooo_okay = sk_wmem_alloc_get(sk) == 0; | |
45 | ||
46 | skb_push(skb, tcp_header_size); | |
47 | skb_reset_transport_header(skb); |