When we use vhost-user backend on the host, MSI-X vector should be set
so that the vmm can get an irq FD and send it to the backend device
process with vhost-user protocol.
Since whether the vector is set for a queue is determined depending on
the queue has a callback, this commit sets an empty callback for
virtio-net's control queue.
Signed-off-by: Keiichi Watanabe <redacted>
---
drivers/net/virtio_net.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -2696,6 +2696,11 @@ static void virtnet_del_vqs(struct virtnet_info *vi)virtnet_free_queues(vi);}+staticvoidvirtnet_ctrlq_done(structvirtqueue*rvq)+{+/* Do nothing */+}+/* How large should a single buffer be so a queue full of these can fit at*leastonefullpacket?*Logicbelowassumesthemergeablebufferheaderisused.
@@ -2748,7 +2753,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)/* Parameters for control virtqueue, if any */if(vi->has_cvq){-callbacks[total_vqs-1]=NULL;+callbacks[total_vqs-1]=virtnet_ctrlq_done;names[total_vqs-1]="control";}
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2021-06-18 12:38:26
On Fri, Jun 18, 2021 at 04:26:25PM +0900, Keiichi Watanabe wrote:
When we use vhost-user backend on the host, MSI-X vector should be set
so that the vmm can get an irq FD and send it to the backend device
process with vhost-user protocol.
Since whether the vector is set for a queue is determined depending on
the queue has a callback, this commit sets an empty callback for
virtio-net's control queue.
Signed-off-by: Keiichi Watanabe <redacted>
I'm confused by this explanation. If the vmm wants to get
an interrupt it can do so - why change the guest driver?
@@ -2696,6 +2696,11 @@ static void virtnet_del_vqs(struct virtnet_info *vi)virtnet_free_queues(vi);}+staticvoidvirtnet_ctrlq_done(structvirtqueue*rvq)+{+/* Do nothing */+}+/* How large should a single buffer be so a queue full of these can fit at*leastonefullpacket?*Logicbelowassumesthemergeablebufferheaderisused.
@@ -2748,7 +2753,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)/* Parameters for control virtqueue, if any */if(vi->has_cvq){-callbacks[total_vqs-1]=NULL;+callbacks[total_vqs-1]=virtnet_ctrlq_done;names[total_vqs-1]="control";}
From: Jason Wang <hidden> Date: 2021-06-21 06:22:28
在 2021/6/18 下午8:38, Michael S. Tsirkin 写道:
On Fri, Jun 18, 2021 at 04:26:25PM +0900, Keiichi Watanabe wrote:
quoted
When we use vhost-user backend on the host, MSI-X vector should be set
so that the vmm can get an irq FD and send it to the backend device
process with vhost-user protocol.
Since whether the vector is set for a queue is determined depending on
the queue has a callback, this commit sets an empty callback for
virtio-net's control queue.
Signed-off-by: Keiichi Watanabe <redacted>
I'm confused by this explanation. If the vmm wants to get
an interrupt it can do so - why change the guest driver?
+1, it sounds like a bug in the backend or we probably need more context
here.
Thanks
@@ -2696,6 +2696,11 @@ static void virtnet_del_vqs(struct virtnet_info *vi)virtnet_free_queues(vi);}+staticvoidvirtnet_ctrlq_done(structvirtqueue*rvq)+{+/* Do nothing */+}+/* How large should a single buffer be so a queue full of these can fit at*leastonefullpacket?*Logicbelowassumesthemergeablebufferheaderisused.
@@ -2748,7 +2753,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)/* Parameters for control virtqueue, if any */if(vi->has_cvq){-callbacks[total_vqs-1]=NULL;+callbacks[total_vqs-1]=virtnet_ctrlq_done;names[total_vqs-1]="control";}