RE: [PATCH for-next] RDMA/nldev: Add parent bdf to device information dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> From: Gal Pressman <galpress@xxxxxxxxxx>
> Sent: Sunday, November 8, 2020 6:34 PM
> 
> On 05/11/2020 22:00, Jason Gunthorpe wrote:
> > On Tue, Nov 03, 2020 at 05:45:26PM +0200, Gal Pressman wrote:
> >> On 03/11/2020 16:22, Jason Gunthorpe wrote:
> >>> 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
> >>
> >> As the commit message says, it's in addition to the device sysfs.
> >>
> >> Many (if not most) of the existing rdma netlink commands are
> >> duplicates of some sysfs entries, but show it in a more "modern" way.
> >> I'm not convinced that bdf should be treated differently.
> >
> > Why did you call it BDF anyhow? it has nothing to do with PCI BDF
> > other than it happens to be the PDF for PCI devices. Netdev called
> > this bus_info
> 
> Are there non pci devices in the subsystem?
Yes. They are coming over auxiliary bus, waiting for the bus and Leon's patchset [2] to be merged.

> I can rename to a more fitting name, will change to bus_info unless someone
> has a better idea.
Yes. I guess you missed the suggestion given in [1].
Basically adding bus name and device name will generate unique bus+device information.
This is generic, not specific to PCI.
RDMA_NLDEV_ATTR_PARENT_DEV_NAME, RDMA_NLDEV_ATTR_PARENT_DEV_BUS_NAME.

[1] https://lore.kernel.org/linux-rdma/cd3f2926-0491-8540-d6b1-534014190bae@xxxxxxxxxx/T/#ma5f71e14abae23fb67a52ff06e74600ce1489e79
[2] https://lore.kernel.org/linux-rdma/DM6PR11MB28417902253469FC9ABB72F0DDEE0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/#m37d9d24903fff0e99e7fec59933d4fe6e6a5162b





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux