Message ID | ec515ebb0b4f56368751b9e318e245a5d994fa72.1688438055.git.yin31149@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | vdpa: Return -EIO if device ack is VIRTIO_NET_ERR | expand |
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index ee273c40ca..03d87e85c8 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -671,8 +671,11 @@ static int vhost_vdpa_net_load_mq(VhostVDPAState *s, if (unlikely(dev_written < 0)) { return dev_written; } + if (*s->status != VIRTIO_NET_OK) { + return -EIO; + } - return *s->status != VIRTIO_NET_OK; + return 0; } static int vhost_vdpa_net_load_offloads(VhostVDPAState *s,