Message ID | 60cd312f-86f9-47e9-0c72-f4c2109e2f87@redhat.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, Dec 13, 2016 at 11:43:00AM +0800, Jason Wang wrote: > Thanks for reporting this issue. Looks like I blindly set the affinity > instead of queues during probe. Could you please try the following patch to > see if it works? This fixed things, thanks!! - Ted > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index b425fa1..fe9f772 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. */ > >
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b425fa1..fe9f772 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. */