[openib-general] Re: [PATH] problem dlopen libibverbs.so

Michael S. Tsirkin mst at mellanox.co.il
Wed Jul 20 15:18:30 PDT 2005


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?

-- 
MST



More information about the general mailing list