diff options
author | Eric Dumazet <edumazet@google.com> | 2013-05-23 03:44:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-23 21:29:20 -0400 |
commit | 547669d483e5783d722772af1483fa474da7caf9 (patch) | |
tree | 1667bc00b7f51cafedbdfb9c446a9ed54670e283 /net | |
parent | 7a1a0cbfeb31f20acc10722642198e76bbc30cb9 (diff) |
tcp: xps: fix reordering issues
commit 3853b5841c01a ("xps: Improvements in TX queue selection")
introduced ooo_okay flag, but the condition to set it is slightly wrong.
In our traces, we have seen ACK packets being received out of order,
and RST packets sent in response.
We should test if we have any packets still in host queue.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_output.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 536d40929ba6..ec335fabd5cc 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -874,11 +874,13 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
874 | &md5); | 874 | &md5); |
875 | tcp_header_size = tcp_options_size + sizeof(struct tcphdr); | 875 | tcp_header_size = tcp_options_size + sizeof(struct tcphdr); |
876 | 876 | ||
877 | if (tcp_packets_in_flight(tp) == 0) { | 877 | if (tcp_packets_in_flight(tp) == 0) |
878 | tcp_ca_event(sk, CA_EVENT_TX_START); | 878 | tcp_ca_event(sk, CA_EVENT_TX_START); |
879 | skb->ooo_okay = 1; | 879 | |
880 | } else | 880 | /* if no packet is in qdisc/device queue, then allow XPS to select |
881 | skb->ooo_okay = 0; | 881 | * another queue. |
882 | */ | ||
883 | skb->ooo_okay = sk_wmem_alloc_get(sk) == 0; | ||
882 | 884 | ||
883 | skb_push(skb, tcp_header_size); | 885 | skb_push(skb, tcp_header_size); |
884 | skb_reset_transport_header(skb); | 886 | skb_reset_transport_header(skb); |