This patch checks whether vDPA device configuration
succeed and does not set the CONFIGURED flag if it
didn't.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
goto out;
if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {
- vdpa_dev->ops->dev_conf(dev->vid);
- dev->flags |= VIRTIO_DEV_VDPA_CONFIGURED;
+ if (vdpa_dev->ops->dev_conf(dev->vid))
+ VHOST_LOG_CONFIG(ERR,
+ "Failed to configure vDPA device\n");
+ else
+ dev->flags |= VIRTIO_DEV_VDPA_CONFIGURED;
}
out: