On Wed, Oct 3, 2012 at 11:47 AM, Alexander Duyck <alexander.h.duyck@xxxxxxxxx> wrote: > The ixgbe_set_max_vfs function has several issues. The two big ones are > that this function assumes it can just enable/disable SR-IOV without any > other changes being necessary which is not the case. I would recommend > looking at ixgbe_setup_tc for how to do this properly. Secondly is the > fact that this code will change the PF network device and as such > sections of the code should be called with the RTNL lock held. In > addition I believe you have to disable SR-IOV before enabling it again > with a different number of VFs. yes, agreed. > > Below is a link to one of the early patches for igb when we were first > introducing SR-IOV, and the in-driver sysfs value had been rejected. I > figure it might be useful as it was also using sysfs to enable/disable > VFs. It however doesn't have the correct locking on changing the queues > and as such will likely throw an error if you were to implement it the > same way now: > http://lists.openwall.net/netdev/2009/04/08/34 yes, that is almost there if put that in-driver value to per device value and ops. Thanks Yinghai -- 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