Skip to content

Commit

Permalink
hv_netvsc: Remove "unlikely" from netvsc_select_queue
Browse files Browse the repository at this point in the history
When using vf_ops->ndo_select_queue, the number of queues of VF is
usually bigger than the synthetic NIC. This condition may happen
often.
Remove "unlikely" from the comparison of ndev->real_num_tx_queues.

Fixes: b3bf566 ("hv_netvsc: defer queue selection to VF")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
haiyangz authored and davem330 committed Aug 20, 2020
1 parent ce51f63 commit 4d82054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,
}
rcu_read_unlock();

while (unlikely(txq >= ndev->real_num_tx_queues))
while (txq >= ndev->real_num_tx_queues)
txq -= ndev->real_num_tx_queues;

return txq;
Expand Down

0 comments on commit 4d82054

Please sign in to comment.