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:

committed by
Jeff Kirsher

parent
eadec877ce
commit
a4ea8a3dac
@@ -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)
|
||||
|
Reference in New Issue
Block a user