On Wed, Apr 12, 2017 at 09:37:22AM -0500, Bodong Wang wrote:This seems interesting to me as well. Not sure if USB driver is applicable or not. And, drivers_autoprobe might work for USB if it doesn't probe the sub-device as default like sriov. Worth to take a look.
On 4/11/2017 4:12 PM, Bjorn Helgaas wrote:Alex mooted the idea of a generic driver core knob for devices that
Hi Bodong,Hi Bjorn,
On Wed, Mar 22, 2017 at 05:53:58PM +0200, bodong@xxxxxxxxxxxx wrote:
From: Bodong Wang <bodong@xxxxxxxxxxxx>>from the PF, all current callers still retain the same functionality.
Sometimes it is not desirable to probe the virtual functions after
SRIOV is enabled. This can save host side resource usage by VF
instances which would be eventually probed to VMs.
Add a new PCI sysfs interface "sriov_probe_vfs" to control that
To modify it, echo 0/n/N (disable probe) or 1/y/Y (enable probe) toIs this basically the same functionality as /sys/bus/pci/drivers_autoprobe,
/sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_probe_vfs
but limited to a specific PF? I.e., could we accomplish the same thing
with the following?
# echo 0 > /sys/bus/pci/devices/DDDD:BB:dd.f/sriov_numvfs
# echo 0 > /sys/bus/pci/drivers_autoprobe
# echo 2 > /sys/bus/pci/devices/DDDD:BB:dd.f/sriov_numvfs
# echo 1 > /sys/bus/pci/drivers_autoprobe
If not, can you contrast the above with drivers_autoprobe? If we need
both, should they be named more similarly?
I agree with Alex about not using driver_autoprobe to achieve this.
It will affect all pci related device once it's disabled(probably in
a bad way).
create child devices. That's intriguing. What other situations
besides SR-IOV do this? Maybe we could add a "drivers_autoprobe"
inside the directory of each device that's capable of having child
devices?
If we continue with the current approach (instead of Alex's idea),Ack, will send v3.
I propose that you:
- Name your new knob "sriov_drivers_autoprobe" to be consistent with
other sriov sysfs files while also being parallel to
"drivers_autoprobe"
- Update Documentation/ABI/testing/sysfs-bus-pci to document your
new knob
- Update Documentation/ABI/... to document drivers_autoprobe