git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bus/pci: check VFIO reset ioctl error
[dpdk.git]
/
drivers
/
bus
/
pci
/
linux
/
pci_vfio.c
diff --git
a/drivers/bus/pci/linux/pci_vfio.c
b/drivers/bus/pci/linux/pci_vfio.c
index
1a3c308
..
360eed3
100644
(file)
--- a/
drivers/bus/pci/linux/pci_vfio.c
+++ b/
drivers/bus/pci/linux/pci_vfio.c
@@
-339,7
+339,11
@@
pci_vfio_setup_device(struct rte_pci_device *dev, int vfio_dev_fd)
}
/* Reset the device */
- ioctl(vfio_dev_fd, VFIO_DEVICE_RESET);
+ if (ioctl(vfio_dev_fd, VFIO_DEVICE_RESET)) {
+ RTE_LOG(ERR, EAL, "Unable to reset device! Error: %d (%s)\n",
+ errno, strerror(errno));
+ return -1;
+ }
return 0;
}