virtio: add names to virtqueue struct, mapping from devices to queues.
Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -906,20 +906,20 @@ static int virtnet_probe(struct virtio_device *vdev)
|
||||
vi->mergeable_rx_bufs = true;
|
||||
|
||||
/* We expect two virtqueues, receive then send. */
|
||||
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
|
||||
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done, "input");
|
||||
if (IS_ERR(vi->rvq)) {
|
||||
err = PTR_ERR(vi->rvq);
|
||||
goto free;
|
||||
}
|
||||
|
||||
vi->svq = vdev->config->find_vq(vdev, 1, skb_xmit_done);
|
||||
vi->svq = vdev->config->find_vq(vdev, 1, skb_xmit_done, "output");
|
||||
if (IS_ERR(vi->svq)) {
|
||||
err = PTR_ERR(vi->svq);
|
||||
goto free_recv;
|
||||
}
|
||||
|
||||
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)) {
|
||||
vi->cvq = vdev->config->find_vq(vdev, 2, NULL);
|
||||
vi->cvq = vdev->config->find_vq(vdev, 2, NULL, "control");
|
||||
if (IS_ERR(vi->cvq)) {
|
||||
err = PTR_ERR(vi->svq);
|
||||
goto free_send;
|
||||
|
Reference in New Issue
Block a user