Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224495
b: refs/heads/master
c: 3853b58
h: refs/heads/master
i:
  224493: 201e820
  224491: 7d12758
  224487: 3f7c59b
  224479: 5cd8b96
v: v3
  • Loading branch information
Tom Herbert authored and David S. Miller committed Nov 24, 2010
1 parent fa42b40 commit a6695cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22f4fbd9bd283ef85126e511171932a4af703776
refs/heads/master: 3853b5841c01a3f492fe137afaad9c209e5162c6
3 changes: 2 additions & 1 deletion trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,10 @@ struct sk_buff {
#else
__u8 deliver_no_wcard:1;
#endif
__u8 ooo_okay:1;
kmemcheck_bitfield_end(flags2);

/* 0/14 bit hole */
/* 0/13 bit hole */

#ifdef CONFIG_NET_DMA
dma_cookie_t dma_cookie;
Expand Down
18 changes: 11 additions & 7 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,20 +2148,24 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
int queue_index;
const struct net_device_ops *ops = dev->netdev_ops;

if (ops->ndo_select_queue) {
if (dev->real_num_tx_queues == 1)
queue_index = 0;
else if (ops->ndo_select_queue) {
queue_index = ops->ndo_select_queue(dev, skb);
queue_index = dev_cap_txqueue(dev, queue_index);
} else {
struct sock *sk = skb->sk;
queue_index = sk_tx_queue_get(sk);
if (queue_index < 0 || queue_index >= dev->real_num_tx_queues) {

queue_index = 0;
if (dev->real_num_tx_queues > 1)
queue_index = skb_tx_hash(dev, skb);
if (queue_index < 0 || skb->ooo_okay ||
queue_index >= dev->real_num_tx_queues) {
int old_index = queue_index;

if (sk) {
struct dst_entry *dst = rcu_dereference_check(sk->sk_dst_cache, 1);
queue_index = skb_tx_hash(dev, skb);

if (queue_index != old_index && sk) {
struct dst_entry *dst =
rcu_dereference_check(sk->sk_dst_cache, 1);

if (dst && skb_dst(skb) == dst)
sk_tx_queue_set(sk, queue_index);
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,11 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
&md5);
tcp_header_size = tcp_options_size + sizeof(struct tcphdr);

if (tcp_packets_in_flight(tp) == 0)
if (tcp_packets_in_flight(tp) == 0) {
tcp_ca_event(sk, CA_EVENT_TX_START);
skb->ooo_okay = 1;
} else
skb->ooo_okay = 0;

skb_push(skb, tcp_header_size);
skb_reset_transport_header(skb);
Expand Down

0 comments on commit a6695cf

Please sign in to comment.