Private definitions for interfacing with NETINT video processing devices over NVMe.
More...
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include "ni_nvme.h"
#include "ni_util.h"
Go to the source code of this file.
|
| ni_retcode_t | ni_nvme_check_error_code (int rc, int opcode, uint32_t xcoder_type, uint32_t hw_id, uint32_t *p_instance_id) |
| | Check f/w error return code, and if it's a fatal one, terminate application's decoding/encoding processing by sending self a SIGTERM signal. Application shall handle this gracefully.
|
| |
| int32_t | ni_nvme_send_admin_cmd (ni_nvme_admin_opcode_t opcode, ni_device_handle_t handle, ni_nvme_command_t *p_ni_nvme_cmd, uint32_t data_len, void *p_data, uint32_t *p_result) |
| | Compose a nvme admin command.
|
| |
| int32_t | ni_nvme_send_io_cmd (ni_nvme_opcode_t opcode, ni_device_handle_t handle, ni_nvme_command_t *p_ni_nvme_cmd, uint32_t data_len, void *p_data, uint32_t *p_result) |
| | Compose a nvme io command.
|
| |
| void | ni_parse_lba (uint64_t lba) |
| | parse the lba opcode, subtype, option It's called only if a I/O read/write fails, so just use the print level "NI_LOG_ERROR" now.
|
| |
| int32_t | ni_nvme_send_read_cmd (ni_device_handle_t handle, ni_event_handle_t event_handle, void *p_data, uint32_t data_len, uint32_t lba) |
| | Compose an io read command.
|
| |
| int32_t | ni_nvme_send_write_cmd (ni_device_handle_t handle, ni_event_handle_t event_handle, void *p_data, uint32_t data_len, uint32_t lba) |
| | Compose a io write command.
|
| |
Private definitions for interfacing with NETINT video processing devices over NVMe.
Definition in file ni_nvme.c.
◆ ROUND_TO_ULONG
| #define ROUND_TO_ULONG |
( |
|
x | ) |
ni_round_up(x,sizeof(uint32_t)) |
◆ ni_nvme_check_error_code()
| ni_retcode_t ni_nvme_check_error_code |
( |
int |
rc, |
|
|
int |
opcode, |
|
|
uint32_t |
xcoder_type, |
|
|
uint32_t |
hw_id, |
|
|
uint32_t * |
p_instance_id |
|
) |
| |
Check f/w error return code, and if it's a fatal one, terminate application's decoding/encoding processing by sending self a SIGTERM signal. Application shall handle this gracefully.
- Parameters
-
return 1 (or non-zero) if need to terminate, 0 otherwise
Definition at line 62 of file ni_nvme.c.
◆ ni_nvme_send_admin_cmd()
Compose a nvme admin command.
- Parameters
-
return
Definition at line 350 of file ni_nvme.c.
◆ ni_nvme_send_io_cmd()
| int32_t ni_nvme_send_io_cmd |
( |
ni_nvme_opcode_t |
opcode, |
|
|
ni_device_handle_t |
handle, |
|
|
ni_nvme_command_t * |
p_ni_nvme_cmd, |
|
|
uint32_t |
data_len, |
|
|
void * |
p_data, |
|
|
uint32_t * |
p_result |
|
) |
| |
Compose a nvme io command.
- Parameters
-
return
Definition at line 397 of file ni_nvme.c.
◆ ni_nvme_send_read_cmd()
| int32_t ni_nvme_send_read_cmd |
( |
ni_device_handle_t |
handle, |
|
|
ni_event_handle_t |
event_handle, |
|
|
void * |
p_data, |
|
|
uint32_t |
data_len, |
|
|
uint32_t |
lba |
|
) |
| |
Compose an io read command.
- Parameters
-
return value < 0, failed, return failure code. value >= 0, success, windows return success code, linux return actural size
Definition at line 554 of file ni_nvme.c.
◆ ni_nvme_send_write_cmd()
| int32_t ni_nvme_send_write_cmd |
( |
ni_device_handle_t |
handle, |
|
|
ni_event_handle_t |
event_handle, |
|
|
void * |
p_data, |
|
|
uint32_t |
data_len, |
|
|
uint32_t |
lba |
|
) |
| |
Compose a io write command.
- Parameters
-
return value < 0, failed, return failure code. value >= 0, success, windows return success code, linux return actural size
Definition at line 660 of file ni_nvme.c.
◆ ni_parse_lba()
| void ni_parse_lba |
( |
uint64_t |
lba | ) |
|
parse the lba opcode, subtype, option It's called only if a I/O read/write fails, so just use the print level "NI_LOG_ERROR" now.
- Parameters
-
- Returns
Definition at line 487 of file ni_nvme.c.