Skip to content

Commit a220871

Browse files
jasowangdavem330
authored andcommitted
virtio-net: correctly enable multiqueue
Commit 4490001 ("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]>
1 parent 8fa3b6f commit a220871

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/virtio_net.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1930,7 +1930,9 @@ static int virtnet_probe(struct virtio_device *vdev)
19301930
goto free_unregister_netdev;
19311931
}
19321932

1933-
virtnet_set_affinity(vi);
1933+
rtnl_lock();
1934+
virtnet_set_queues(vi, vi->curr_queue_pairs);
1935+
rtnl_unlock();
19341936

19351937
/* Assume link up if device can't report link status,
19361938
otherwise get link status from config. */

0 commit comments

Comments
 (0)