summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2018-07-09 12:19:54 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-07-09 13:15:34 -0700
commita4ea8a3dacc312c3402c78f6e4843afdda9b43a0 (patch)
tree56b8cb99e2356716f23895ccda1364c3911bf4c8 /net/core/dev.c
parenteadec877ce9ca46a94e9036b5a44e7941d4fc501 (diff)
downloadblackbird-obmc-linux-a4ea8a3dacc312c3402c78f6e4843afdda9b43a0.tar.gz
blackbird-obmc-linux-a4ea8a3dacc312c3402c78f6e4843afdda9b43a0.zip
net: Add generic ndo_select_queue functions
This patch adds a generic version of the ndo_select_queue functions for either returning 0 or selecting a queue based on the processor ID. This is generally meant to just reduce the number of functions we have to change in the future when we have to deal with ndo_select_queue changes. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c14
1 files changed, 14 insertions, 0 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:
#endif
}
+u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,
+ void *accel_priv, select_queue_fallback_t fallback)
+{
+ return 0;
+}
+EXPORT_SYMBOL(dev_pick_tx_zero);
+
+u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,
+ void *accel_priv, select_queue_fallback_t fallback)
+{
+ return (u16)raw_smp_processor_id() % dev->real_num_tx_queues;
+}
+EXPORT_SYMBOL(dev_pick_tx_cpu_id);
+
static u16 ___netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
OpenPOWER on IntegriCloud