Skip to content

Commit c3d897e

Browse files
haiyangzdavem330
authored andcommitted
hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit()
netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the queue number, so the “skb->queue_mapping - 1” will be used. This may cause the last queue of VF not been used. Use skb_record_rx_queue() here, so that the skb_get_rx_queue() called later will get the correct queue number, and VF will be able to use all queues. Fixes: b3bf566 ("hv_netvsc: defer queue selection to VF") Signed-off-by: Haiyang Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4d82054 commit c3d897e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/hyperv/netvsc_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static int netvsc_vf_xmit(struct net_device *net, struct net_device *vf_netdev,
502502
int rc;
503503

504504
skb->dev = vf_netdev;
505-
skb->queue_mapping = qdisc_skb_cb(skb)->slave_dev_queue_mapping;
505+
skb_record_rx_queue(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping);
506506

507507
rc = dev_queue_xmit(skb);
508508
if (likely(rc == NET_XMIT_SUCCESS || rc == NET_XMIT_CN)) {

0 commit comments

Comments
 (0)