Message ID | b0396b80e96322b86f1a0b10c098fc1edd947d72.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 03d87e85c8..36aa2d7f8c 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -712,8 +712,11 @@ static int vhost_vdpa_net_load_offloads(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(NetClientState *nc)