Message ID | 20240606061446.127802-4-hengqi@linux.alibaba.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | virtio_net: enable the irq for ctrlq | expand |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 823a9dca51c1..e59e12bb7601 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2721,7 +2721,8 @@ static bool virtnet_send_command_reply(struct virtnet_info *vi, sgs[out_num + in_num++] = in; BUG_ON(out_num + in_num > ARRAY_SIZE(sgs)); - ret = virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, vi, GFP_ATOMIC); + ret = virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, + &ctrl->completion, GFP_ATOMIC); if (ret < 0) { dev_warn(&vi->vdev->dev, "Failed to add sgs for command vq: %d\n.", ret);
Previously, control vq only allowed a single request to be sent, so using virtnet_info as a global token was fine. To support concurrent requests, the driver needs to use a command-level token to distinguish between requests that have been sent. Signed-off-by: Heng Qi <hengqi@linux.alibaba.com> --- drivers/net/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)