diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 3721fbb9a83c..b9b22a3c4c8f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2058,16 +2058,16 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev, | |||
2058 | struct sk_buff *skb) | 2058 | struct sk_buff *skb) |
2059 | { | 2059 | { |
2060 | int queue_index; | 2060 | int queue_index; |
2061 | struct sock *sk = skb->sk; | 2061 | const struct net_device_ops *ops = dev->netdev_ops; |
2062 | 2062 | ||
2063 | queue_index = sk_tx_queue_get(sk); | 2063 | if (ops->ndo_select_queue) { |
2064 | if (queue_index < 0) { | 2064 | queue_index = ops->ndo_select_queue(dev, skb); |
2065 | const struct net_device_ops *ops = dev->netdev_ops; | 2065 | queue_index = dev_cap_txqueue(dev, queue_index); |
2066 | } else { | ||
2067 | struct sock *sk = skb->sk; | ||
2068 | queue_index = sk_tx_queue_get(sk); | ||
2069 | if (queue_index < 0) { | ||
2066 | 2070 | ||
2067 | if (ops->ndo_select_queue) { | ||
2068 | queue_index = ops->ndo_select_queue(dev, skb); | ||
2069 | queue_index = dev_cap_txqueue(dev, queue_index); | ||
2070 | } else { | ||
2071 | queue_index = 0; | 2071 | queue_index = 0; |
2072 | if (dev->real_num_tx_queues > 1) | 2072 | if (dev->real_num_tx_queues > 1) |
2073 | queue_index = skb_tx_hash(dev, skb); | 2073 | queue_index = skb_tx_hash(dev, skb); |