libxcoder  3.5.1
ni_nvme_logan.c File Reference

Private routines related to working with NI T-408 over NVME interface. More...

#include "ni_nvme_logan.h"
#include "ni_util_logan.h"

Go to the source code of this file.

Macros

#define ROUND_TO_ULONG(x)   ni_logan_round_up(x,sizeof(uint32_t))
 

Functions

ni_logan_retcode_t ni_logan_nvme_check_error_code (int rc, ni_logan_nvme_admin_opcode_t opcode, uint32_t xcoder_type, uint32_t hw_id, int32_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. More...
 
void ni_logan_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. More...
 
int32_t ni_logan_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 a io read command. More...
 
int32_t ni_logan_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. More...
 

Detailed Description

Private routines related to working with NI T-408 over NVME interface.


Definition in file ni_nvme_logan.c.

Macro Definition Documentation

◆ ROUND_TO_ULONG

#define ROUND_TO_ULONG (   x)    ni_logan_round_up(x,sizeof(uint32_t))

Definition at line 44 of file ni_nvme_logan.c.

Function Documentation

◆ ni_logan_nvme_check_error_code()

ni_logan_retcode_t ni_logan_nvme_check_error_code ( int  rc,
ni_logan_nvme_admin_opcode_t  opcode,
uint32_t  xcoder_type,
uint32_t  hw_id,
int32_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.

Check f/w error return code, and if it's a fatal one return NI_LOGAN_RETCODE_FAILURE. Application shall handle this gracefully.


Parameters

Definition at line 55 of file ni_nvme_logan.c.

◆ ni_logan_nvme_send_read_cmd()

int32_t ni_logan_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 a io read command.


Parameters

Definition at line 382 of file ni_nvme_logan.c.

◆ ni_logan_nvme_send_write_cmd()

int32_t ni_logan_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

Definition at line 454 of file ni_nvme_logan.c.

◆ ni_logan_parse_lba()

void ni_logan_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
lbais 4k aligned
Returns

Definition at line 321 of file ni_nvme_logan.c.