Slava, Matan, what do you think?

29/08/2022 10:51, Ferruh Yigit:
> On 8/29/2022 8:58 AM, Thomas Monjalon wrote:
> > 22/08/2022 20:27, Long Li:
> >>> On 8/22/2022 4:03 PM, Ferruh Yigit wrote:
> >>>>> +       ibv_list = ibv_get_device_list(&num_devices);
> >>>>> +       for (ibv_idx = 0; ibv_idx < num_devices; ibv_idx++) {
> >>>>> +               struct ibv_device *ibdev = ibv_list[ibv_idx];
> >>>>> +               struct rte_pci_addr pci_addr;
> >>>>> +
> >>>>> +               DRV_LOG(INFO, "Probe device name %s dev_name %s
> >>>>> ibdev_path %s",
> >>>>> +                       ibdev->name, ibdev->dev_name,
> >>>>> +ibdev->ibdev_path);
> >>>>
> >>>> As far as I understand, intention of this loop is to find 'ibdev'
> >>>> matching this device, code gooes through all "ibv device list" for
> >>>> this, I wonder if there is a easy way for doing this, like a sysfs
> >>>> entry to help getting this information?
> >>>> And how mlx4/5 does this?
> >>>
> >>> Since there are multiple RDMA devices now, does it make sense to have
> >>> RDMA bus driver, which can hide some PCIe details under bus, and driver 
> >>> can
> >>> get PCI and ibdev information during probe?
> >>
> >> Mellanox drivers use a similar way to go through the list of IB devices.
> >>
> >> Matan, Viacheslav, what are your thoughts on implementing a bus for RDMA 
> >> devices?
> > 
> > These are PCI devices first.
> > Is it a good idea to have a bus driver on top of another one?
> > What would be the responsibility of such a bus driver?
> > 
> 
> As far as I can see a 'ibdev' device struct is required to be able to 
> configure the device, so rdma bus can be on top of PCI and find matching 
> 'ibdev' device for it, and driver probe can get pci and ibdev 
> information directly, instead of each rdma device driver walking through 
> all ibdev devices (ibv_get_device_list()).



Reply via email to