aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2010-11-21 08:17:29 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-24 14:44:19 -0500
commit3853b5841c01a3f492fe137afaad9c209e5162c6 (patch)
tree6781db9ec592d9798129cd4715ce00dc9007b78c /net/ipv4/tcp_output.c
parent22f4fbd9bd283ef85126e511171932a4af703776 (diff)
xps: Improvements in TX queue selection
In dev_pick_tx, don't do work in calculating queue index or setting the index in the sock unless the device has more than one queue. This allows the sock to be set only with a queue index of a multi-queue device which is desirable if device are stacked like in a tunnel. We also allow the mapping of a socket to queue to be changed. To maintain in order packet transmission a flag (ooo_okay) has been added to the sk_buff structure. If a transport layer sets this flag on a packet, the transmit queue can be changed for the socket. Presumably, the transport would set this if there was no possbility of creating OOO packets (for instance, there are no packets in flight for the socket). This patch includes the modification in TCP output for setting this flag. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index bb8f547fc7d2..5f29b2e20e23 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -822,8 +822,11 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
822 &md5); 822 &md5);
823 tcp_header_size = tcp_options_size + sizeof(struct tcphdr); 823 tcp_header_size = tcp_options_size + sizeof(struct tcphdr);
824 824
825 if (tcp_packets_in_flight(tp) == 0) 825 if (tcp_packets_in_flight(tp) == 0) {
826 tcp_ca_event(sk, CA_EVENT_TX_START); 826 tcp_ca_event(sk, CA_EVENT_TX_START);
827 skb->ooo_okay = 1;
828 } else
829 skb->ooo_okay = 0;
827 830
828 skb_push(skb, tcp_header_size); 831 skb_push(skb, tcp_header_size);
829 skb_reset_transport_header(skb); 832 skb_reset_transport_header(skb);