> -----Original Message----- > From: Don Dutile [mailto:ddutile@xxxxxxxxxx] > Sent: Wednesday, October 03, 2012 12:03 PM > To: Duyck, Alexander H > Cc: Yinghai Lu; Bjorn Helgaas; Greg Kroah-Hartman; linux- > pci@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; yuvalmin@xxxxxxxxxxxx; > bhutchings@xxxxxxxxxxxxxx; Rose, Gregory V; davem@xxxxxxxxxxxxx--no-chain- > reply-to; Kirsher, Jeffrey T; Brandeburg, Jesse; David S. Miller; > Fastabend, John R; e1000-devel@xxxxxxxxxxxxxxxxxxxxx; > netdev@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 5/5] ixgbe: add driver set_max_vfs support > > On 10/03/2012 02:47 PM, Alexander Duyck wrote: [snip] > > > > 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. > > > > 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 > > > > Thanks, > > > > Alex > > Alex, > Thanks for patch set pointer. > When I started to work on the ixgbe example use based on the RFC set I > posted, I ran into the problem you outlined -- the PF uses/consumes all > the queues & MSI intrs when sriov not enabled at driver load time, which > required more network shutdown logic that I'm not familiar with... So, I > was going to defer to Greg to work that magic. :) > Greg: assume the 2 callback function interface in the RFC patch set I > sent, > (primarily, just the include/linux/pci.h changes), and you can make > the > necessary drivers mods from there. In the meantime, I'll make the > changes > to my original/v1 RFC to reflect the changes that GKH & Yinghai > recommended/implemented > for sysfs attribute creation & removal in a v2 posting. > The end result is that the current module parameter setting for > max_vfs should > continue to work, and the sysfs interface will work when those > pieces are provided. OK, I'll start work on it. Thanks Don, - Greg > > -Don -- 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