]> git.itanic.dy.fi Git - linux-stable/commitdiff
hv_netvsc: Remove "unlikely" from netvsc_select_queue
authorHaiyang Zhang <haiyangz@microsoft.com>
Thu, 20 Aug 2020 21:53:14 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:40:34 +0000 (12:40 +0200)
commit 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 upstream.

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: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c

index 42eb7a7ecd96b390224e9d20ba756ea86f931cab..362b7ca6f3b2a863ef614be88b3863d944948929 100644 (file)
@@ -366,7 +366,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;