iodimm_handle.h File Reference
#include <fio/public/iodimm_types.h>
Go to the source code of this file.
Function Documentation
Close an ioDimm handle that was opened with open_iodimm_handle. The handle will be invalidated in the selector.
- Parameters:
-
| input | See iodimm_types.h for more information on how to populate this struct. |
- Returns:
- FIO_STATUS_SUCCESS: Success. FIO_STATUS_FAILURE: Unable to close the device. FIO_STATUS_INVALID_INPUT: Invalid input parameters.
DllExport uint16_t fio_enumerate_iodimms |
( |
fio_iodimm_selector_t ** |
dimm_array, |
|
|
uint16_t |
dimm_array_size | |
|
) |
| | |
Discover ioDimms attached to this system's PCI bus.
- Parameters:
-
| dimm_array | Pointer to pre-allocated array of pointers. Each pointer is populated with a new device selector for each discovered device. This memory is dynamically allocated and must be freed by calling fio_free_enumerated_iodimms. |
| dimm_array_size | Size of the output array. If the value is zero, this function returns only the total number of discovered devices, without populating any data in output, Therefore, this function should first be called with dimm_array_size = 0 to determine how to allocate the output array. |
- Returns:
- 0 to N: Total number of ioDimms attached to the system's PCI bus.
DllExport void fio_free_enumerated_iodimms |
( |
fio_iodimm_selector_t ** |
dimm_array, |
|
|
uint16_t |
dimm_array_size | |
|
) |
| | |
Free memory allocated by fio_enumerate_iodimms.
- Parameters:
-
| dimm_array | Pointer array populated by fio_enumerate_iodimms. |
| dimm_array_size | Size of dimm_array. |
Return the first iodimm handle attached to this system's PCI bus. On Linux, this function can return devices based on their PCI address when the driver is not loaded.
- Parameters:
-
| iterator | Pointer to a pre-allocated iterator structure. This structure is used internally to manage iterator state. |
| input | Pointer to a pre-allocated selector structure. This structure will be populated with the selector information for the first iodimm handle. |
- Returns:
- FIO_STATUS_SUCCESS: Success. (device information was copied into input) FIO_STATUS_DEVICE_NOT_FOUND: The end of the list has been reached. (no information was copied into input) FIO_STATUS_FAILURE: Internal failure occurred. FIO_STATUS_DRIVER_NOT_LOADED: The current platform does not support this function while the driver is not loaded. FIO_STATUS_INVALID_INPUT: Invalid input parameters.
Return the next iodimm handle attached to this system's PCI bus. first_iodimm_handle() should have been called to start iteration. On Linux, this function can return devices based on their PCI address when the driver is not loaded.
- Parameters:
-
| iterator | Pointer to a pre-allocated iterator structure which was initialized by calling first_iodimm_handle(). This structure is used internally to manage iterator state. |
| input | Pointer to a pre-allocated selector structure. This structure will be populated with the selector information for the next iodimm handle. |
- Returns:
- FIO_STATUS_SUCCESS: Success. (device information was copied into input) FIO_STATUS_DEVICE_NOT_FOUND: The end of the list has been reached. (no information was copied into input) FIO_STATUS_FAILURE: Internal failure occurred. FIO_STATUS_INVALID_INPUT: Invalid input parameters.
Open an ioDimm handle and store the it in the selector for future use. You must call close_iodimm_handle when you are finished with the handle.
- Parameters:
-
| input | See iodimm_types.h for more information on how to populate this struct. |
- Returns:
- FIO_STATUS_SUCCESS: Success. FIO_STATUS_DEVICE_NOT_FOUND: Device was not found. FIO_STATUS_FAILURE: Internal failure occurred. FIO_STATUS_ENOMEM: Not enough memory to complete the request. FIO_STATUS_DRIVER_LOADED: The selector mode is invalid while the driver is loaded (PCI modes). FIO_STATUS_UNSUPPORTED: The selector mode is not supported on the current platform. FIO_STATUS_INVALID_INPUT: Invalid input parameters. FIO_STATUS_FAILURE_PERM: User did not have permissions to open the device.