>> Also, you need to do this _before_ the device shows up to userspace, >> otherwise you have a race that you just lost with udev and the like. >> >> thanks, >> >> greg k-h > > > So, why is it ok to create the 'reset' file after the device shows up? > Like reset, SRIOV is optional. The sysfs files are designed to only > be used by userspace utils to enable/disable VFs after the system is up. It should (the attribute) be there when the device is created. Otherwise you end up with the case when udev could call 'reset' attribute the moment the SR-IOV device shows up. Or the userspace utility could. > Or should the design allow a udev rule to be created that if one > of these new sriov files exists, then perform a set of read-max-vf & > enable n-vf ops ? Well, that depends on the ingenuity of the udev rules writers. But we should also make sure that the concept is race-free. You don't want the udev rules to have 'sleep 1' to work-around the kernel code. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html