aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c14
-rw-r--r--net/packet/af_packet.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 09a7cc2f3c55..b5e538032d5e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3617,6 +3617,20 @@ get_cpus_map:
3617#endif 3617#endif
3618} 3618}
3619 3619
3620u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,
3621 void *accel_priv, select_queue_fallback_t fallback)
3622{
3623 return 0;
3624}
3625EXPORT_SYMBOL(dev_pick_tx_zero);
3626
3627u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,
3628 void *accel_priv, select_queue_fallback_t fallback)
3629{
3630 return (u16)raw_smp_processor_id() % dev->real_num_tx_queues;
3631}
3632EXPORT_SYMBOL(dev_pick_tx_cpu_id);
3633
3620static u16 ___netdev_pick_tx(struct net_device *dev, struct sk_buff *skb, 3634static u16 ___netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
3621 struct net_device *sb_dev) 3635 struct net_device *sb_dev)
3622{ 3636{
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 47931ebfaef3..f37d087ae652 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -277,7 +277,7 @@ static bool packet_use_direct_xmit(const struct packet_sock *po)
277 277
278static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb) 278static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb)
279{ 279{
280 return (u16) raw_smp_processor_id() % dev->real_num_tx_queues; 280 return dev_pick_tx_cpu_id(dev, skb, NULL, NULL);
281} 281}
282 282
283static u16 packet_pick_tx_queue(struct sk_buff *skb) 283static u16 packet_pick_tx_queue(struct sk_buff *skb)