On Thu, 2015-11-05 at 11:23 -0800, Stephen Hemminger wrote: > On Thu, 05 Nov 2015 11:39:04 -0500 > "Charles (Chas) Williams" <3chas3 at gmail.com> wrote: > > > On Wed, 2015-11-04 at 23:40 +0100, Thomas Monjalon wrote: > > > 2015-10-14 09:41, Charles Williams: > > > > On Tue, 2015-10-13 at 14:49 +0200, Olivier MATZ wrote: > > > > > For PCI devices that have several interfaces (I think it's the case > > > > > for > > > > > some Mellanox boards), maybe we should not store the interface name? > > > > > > > > I am not sure what you mean here. If a device has multiple ethernet > > > > interfaces, then it should a have seperate PCI device address space for > > > > each interface (I dont know of any DPDK drivers that don't make this > > > > assumption as well). > > > > > > mlx4 and cxgbe? > > > > OK, I see now. I don't know of a way to tell if a device has multiple > > ports just from the pci vendor/device id without maintaining some > > sort of table. > > > > Do these devices have multiple interfaces listed in their > > /sys/devices/.../net diretory? If so, matching one of the listed > > interfaces can just blacklist the whole device similar to blacklisting > > by the device id. > > Devices with multiple ports are supposed to report the port via > /sys/class/net/xxx/portid
But I want to find the ports associated by the PCI devices. > But you aren't going to be able to blacklist only one port of these devices. > The two drivers would be fighting over registers and IRQ management. > Plus kernel bind/unbind is by PCI id. I understand that. Blacklisting an interface on a multiple port device would be essentially the same as blacklist by the PCI device id. You can't split the PCI device. I just need to find the list of ports associated with a single PCI device.