[openib-general] what happens if one close the device in user level without releasing the resources?
Dotan Barak
dotanb at dev.mellanox.co.il
Sun Oct 15 02:43:02 PDT 2006
Michael S. Tsirkin wrote:
> Quoting r. Dotan Barak <dotanb at dev.mellanox.co.il>:
>
>> Subject: what happens if one close the device in user level without releasing the resources?
>>
>> Hi.
>>
>> What should happen if one opens the IB device, allocate resources and
>> close the device?
>> for example, if a user do the following operations in a loop:
>> ibv_get_device_list
>> in a loop:
>> ibv_open_device
>> ibv_alloc_pd
>> ibv_create_cq
>> ibv_close_device?
>>
>> should the ibv_close_device clean all of the allocated resources or it
>> is up to the user to take care of this?
>>
> Up to the user.
>
>
The problem is that after one closed the HCA:
1) he don't know if he closed all of the resources
2) he can't release the resources that he have (i believe that this will
cause a memory corruption ..)
When one tries to deallocate a PD which being used, this operation fail.
can this verb (ibv_close_device) behave the same?
thanks
Dotan
More information about the general
mailing list