mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
virtio-net: correctly enable multiqueue
Commit 4490001029 ("virtio-net: enable
multiqueue by default") blindly set the affinity instead of queues
during probe which can cause a mismatch of #queues between guest and
host. This patch fixes it by setting queues.
Reported-by: Theodore Ts'o <[email protected]>
Tested-by: Theodore Ts'o <[email protected]>
Cc: Neil Horman <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Fixes: 49000102901 ("virtio-net: enable multiqueue by default")
Signed-off-by: Jason Wang <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
committed by
David S. Miller
parent
8fa3b6f939
commit
a220871be6
@@ -1930,7 +1930,9 @@ static int virtnet_probe(struct virtio_device *vdev)
|
||||
goto free_unregister_netdev;
|
||||
}
|
||||
|
||||
virtnet_set_affinity(vi);
|
||||
rtnl_lock();
|
||||
virtnet_set_queues(vi, vi->curr_queue_pairs);
|
||||
rtnl_unlock();
|
||||
|
||||
/* Assume link up if device can't report link status,
|
||||
otherwise get link status from config. */
|
||||
|
||||
Reference in New Issue
Block a user