Re: Add a helper function in PCI IOV to get VF device

From: Frank Pan
Date: Wed Jun 02 2010 - 23:11:47 EST


> So, when VF has no interface, this path is also unavailable. That's
> why I say given vf's bdf, one cannot infer pf's.

Sorry I just missed something. Userspace can find pf's bdf by physfn.

So, the motivation is provide some information about vf from pf driver by sysfs.

I cannot avoid to create one directory for each vf, like vf0, vf1,
etc. Although userspace can find these directories, but it has no idea
about which one to use. Userspace just knows vf's bdf, it won't care
about/know vf's id. So I have the issue to create a symlink from each
vf's /sys/bus/pci/devices/xxxx/ to their corresponding directories.

And then comes the issue: PF cannot get VF's bdf in kernel space.

This is not a strange issue, hacking every SR-IOV device can met.

Thanks.

--
Frank Pan

Computer Science and Technology
Tsinghua University
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/