On Tue, Nov 03, 2020 at 04:11:19PM +0200, Gal Pressman wrote: > On 03/11/2020 15:57, Leon Romanovsky wrote: > > On Tue, Nov 03, 2020 at 09:45:22AM -0400, Jason Gunthorpe wrote: > >> On Tue, Nov 03, 2020 at 03:26:27PM +0200, Gal Pressman wrote: > >>> Add the ability to query the device's bdf through rdma tool netlink > >>> command (in addition to the sysfs infra). > >>> > >>> In case of virtual devices (rxe/siw), the netdev bdf will be shown. > >> > >> Why? What is the use case? > > > > Right, and why isn't netdev (RDMA_NLDEV_ATTR_NDEV_NAME) enough? > > When taking system topology into consideration you need some way to pair the > ibdev and bdf, especially when working with multiple devices. > The netdev name doesn't exist on devices with no netdevs (IB, EFA). You are supposed to use sysfs /sys/class/infiniband/ibp0s9/device Should always be the physical device > Why rdma tool? Because it's more intuitive than sysfs. But we generally don't put this information into netlink BDF is just the start, you need all the other topology information to make sense of it, and all that is in sysfs only already Jason