]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.4.51/tcp-xps-fix-reordering-issues.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.51 / tcp-xps-fix-reordering-issues.patch
CommitLineData
7a674766
GKH
1From eb473853522f6481d2c933109be2f8236fa8913d Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <edumazet@google.com>
3Date: Thu, 23 May 2013 07:44:20 +0000
4Subject: tcp: xps: fix reordering issues
5
6From: Eric Dumazet <edumazet@google.com>
7
8[ Upstream commit 547669d483e5783d722772af1483fa474da7caf9 ]
9
10commit 3853b5841c01a ("xps: Improvements in TX queue selection")
11introduced ooo_okay flag, but the condition to set it is slightly wrong.
12
13In our traces, we have seen ACK packets being received out of order,
14and RST packets sent in response.
15
16We should test if we have any packets still in host queue.
17
18Signed-off-by: Eric Dumazet <edumazet@google.com>
19Cc: Tom Herbert <therbert@google.com>
20Cc: Yuchung Cheng <ycheng@google.com>
21Cc: Neal Cardwell <ncardwell@google.com>
22Signed-off-by: David S. Miller <davem@davemloft.net>
23Signed-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);