From: Jason Wang Date: Tue, 13 Dec 2016 06:23:05 +0000 (+0800) Subject: virtio-net: correctly enable multiqueue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a220871be66f99d8957c693cf22ec67ecbd9c23a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git virtio-net: correctly enable multiqueue Commit 4490001029012539937ff02778fe6180613fa949 ("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 Tested-by: Theodore Ts'o Cc: Neil Horman Cc: Michael S. Tsirkin Fixes: 49000102901 ("virtio-net: enable multiqueue by default") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b425fa1013af..fe9f7726e990 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -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. */