src/netvsc_drv.c
/*
 * Select queue for transmit.
 *
 * If a valid queue has already been assigned, then use that.
 * Otherwise compute tx queue based on hash and the send table.
 *
 * This is basically similar to default (netdev_pick_tx) with the added step
 * of using the host send_table when no other queue has been assigned.
 *
 * TODO support XPS - but get_xps_queue not exported
 */
Select queue for transmit.
If a valid queue has already been assigned, then use that.
Otherwise compute tx queue based on hash and the send table.

This is basically similar to default (netdev_pick_tx) with the added step
of using the host send_table when no other queue has been assigned.


Select queue for transmit . If a valid queue has already been assigned then use that . Otherwise compute tx queue based on hash and the send table . This is basically similar to default ( netdev_pick_tx ) with the added step of using the host send_table when no other queue has been assigned .
static u16 netvsc_pick_tx(struct net_device *ndev, struct sk_buff *skb)
{
	int q_idx = sk_tx_queue_get(skb->sk);
	if (q_idx < 0 || skb->ooo_okay || q_idx >= ndev->real_num_tx_queues) {
		if (skb_rx_queue_recorded(skb))
			q_idx = skb_get_rx_queue(skb);
		else
			q_idx = netvsc_get_tx_queue(ndev, skb, q_idx);
	}
	return q_idx;
}
static u16 netvsc_pick_tx ( struct net_device * ndev , struct sk_buff * skb ) { int q_idx = sk_tx_queue_get ( skb -> sk ) ; if ( q_idx < 0 || skb -> ooo_okay || q_idx >= ndev -> real_num_tx_queues ) { if ( skb_rx_queue_recorded ( skb ) ) q_idx = skb_get_rx_queue ( skb ) ; else q_idx = netvsc_get_tx_queue ( ndev , skb , q_idx ) ; } return q_idx ; }
Select queue for transmit.
Select queue for transmit .
/* If forwarding a packet, we use the recorded queue when
		 * available for better cache locality.
		 */