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>
This commit is contained in:
Alexander Duyck
2018-07-09 12:19:54 -04:00
committed by Jeff Kirsher
parent eadec877ce
commit a4ea8a3dac
6 changed files with 22 additions and 26 deletions

View File

@@ -277,7 +277,7 @@ static bool packet_use_direct_xmit(const struct packet_sock *po)
static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb)
{
return (u16) raw_smp_processor_id() % dev->real_num_tx_queues;
return dev_pick_tx_cpu_id(dev, skb, NULL, NULL);
}
static u16 packet_pick_tx_queue(struct sk_buff *skb)