-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibv_open_device() not called before ibv_free_device_list()? #1300
Comments
Submit a pull request. |
On my Linux host the header /**
* ibv_get_device_list - Get list of IB devices currently available
* @num_devices: optional. if non-NULL, set to the number of devices
* returned in the array.
*
* Return a NULL-terminated array of IB devices. The array can be
* released with ibv_free_device_list().
*/
struct ibv_device **ibv_get_device_list(int *num_devices);
/**
* ibv_free_device_list - Free list from ibv_get_device_list()
*
* Free an array of devices returned from ibv_get_device_list(). Once
* the array is freed, pointers to devices that were not opened with
* ibv_open_device() are no longer valid. Client code must open all
* devices it intends to use before calling ibv_free_device_list().
*/
void ibv_free_device_list(struct ibv_device **list);
/**
* ibv_open_device - Initialize device for use
*/
struct ibv_context *ibv_open_device(struct ibv_device *device); This means one valid way to use the API is to call In the current implementation One thing I do not understand yet is whether copying the entire For reference, the library source code seems to be this. |
https://github.com/the-tcpdump-group/libpcap/blob/408e16ce185cb049da5c686d1bce5024cc8f43df/pcap-rdmasniff.c#L425C2-L425C33
According to the verbs.h API comment, Client code must open all devices it intends to use before calling ibv_free_device_list().
The text was updated successfully, but these errors were encountered: