Message ID | a21731518644abbd0c495c5b7960527c5911f80d.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 e19ab063fa..ee273c40ca 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -646,8 +646,9 @@ static int vhost_vdpa_net_load_mac(VhostVDPAState *s, const VirtIONet *n) if (unlikely(dev_written < 0)) { return dev_written; } - - return *s->status != VIRTIO_NET_OK; + if (*s->status != VIRTIO_NET_OK) { + return -EIO; + } } return 0;