On 1/15/2018 7:24 AM, Thomas Monjalon wrote:
11/01/2018 15:05, Jeff Guo:
+enum rte_dev_state {
+ RTE_DEV_UNDEFINED, /**< unknown device state */
+ RTE_DEV_FAULT, /**< device fault or error */
+ RTE_DEV_PARSED, /**< device have been parsed on bus*/
+ RTE_DEV_PROBED, /**< devcie have been probed driver */
+};
Let's start with nitpicks: please be careful with spacing in comments.
+ typo: devcie
+ grammar: device has
What means parsed on bus? Is it "scanned"?
absolutely what i mean is scanned.
+enum rte_dev_subsystem {
+ RTE_DEV_SUBSYSTEM_UIO,
+ RTE_DEV_SUBSYSTEM_VFIO,
+ RTE_DEV_SUBSYSTEM_PCI,
+ RTE_DEV_SUBSYSTEM_MAX
+};
I don't think PCI and UIO/VFIO should be described at the same level.
Can you re-use the enum rte_kernel_driver?
rte_kernel_driver might be not qualify for that use, since that is the event
sumsystem, it include pci/uio/vfio, such strings to identify each subsystem. i
will modify it to be rte_dev_event_subsystem.
+enum event_monitor_netlink_group {
+ RTE_DEV_EVENT_MONITOR_KERNEL,
+ RTE_DEV_EVENT_MONITOR_UDEV,
+};
This enum should be prefixed with rte_
sure.
+ enum event_monitor_netlink_group group; /**< device netlink group */
netlink is specific to Linux.
I don't think it should be in a generic API struct.
agree.