diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2020-08-20 14:53:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-23 12:10:57 +0200 |
commit | 931f10b04b3040c602466f90989f798aa1cf5ddc (patch) | |
tree | b9db42c0578273f9c9e19eb3711d49c30de6ac9f | |
parent | cf1a59e1ac54d8f7e211b845100dbd778624aeda (diff) | |
download | linux-stable-931f10b04b3040c602466f90989f798aa1cf5ddc.tar.gz linux-stable-931f10b04b3040c602466f90989f798aa1cf5ddc.tar.bz2 linux-stable-931f10b04b3040c602466f90989f798aa1cf5ddc.zip |
hv_netvsc: Remove "unlikely" from netvsc_select_queue
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>
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 4a5d99ecb89d..2dff0e110c6f 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -378,7 +378,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; |