[openib-general] Re: [PATH] problem dlopen libibverbs.so
Gleb Natapov
glebn at voltaire.com
Wed Jul 20 23:21:39 PDT 2005
On Thu, Jul 21, 2005 at 01:18:30AM +0300, Michael S. Tsirkin wrote:
> Quoting r. Roland Dreier <rolandd at cisco.com>:
> > Subject: Re: [PATH] problem dlopen libibverbs.so
> >
> > Michael> I wander if its a better idea to scan the plugin
> > Michael> directory on ibv_get_devices. Seems to me it might be
> > Michael> more debuggable for applications if they get error
> > Michael> messages when they call ibv_get_devices, and not at
> > Michael> startup: they can step in debugger to figure out what is
> > Michael> printing these things.
> >
> > Michael> Roland, would you take such a patch?
> >
> > I was thinking the same thing -- lazy initialization of libibverbs
> > when it is first use. So yes, such a patch would be useful.
> >
> > - R.
> >
>
> Question:
>
> dlist_for_each_data(driver_list, driver, struct ibv_driver) {
> dev = driver->init_func(verbs_dev);
> if (dev) {
> dev->dev = verbs_dev;
> dev->ibdev = ib_dev;
> dev->driver = driver;
>
> dlist_push(device_list, dev);
>
> return;
> }
> }
>
> Why is this done at library initialization?
> Wouldnt device opening be a better place?
> Am I missing something?
>
If you are going to rewrite library initialisation and device discovery
perhaps you should write support for hotpluggable devices too? Currently
libibdev scans sysfs only once during init. What if device was plugged
after application was launched?
What do you think?
--
Gleb.
More information about the general
mailing list