nvme工具函数定义 更多...
#include "./nvme.h"
函数 | |
int | nvme_check_sqid (FemuCtrl *n, uint16_t sqid) |
int | nvme_check_cqid (FemuCtrl *n, uint16_t cqid) |
void | nvme_inc_cq_tail (NvmeCQueue *cq) |
void | nvme_inc_sq_head (NvmeSQueue *sq) |
void | nvme_update_sq_tail (NvmeSQueue *sq) |
void | nvme_update_cq_head (NvmeCQueue *cq) |
uint8_t | nvme_cq_full (NvmeCQueue *cq) |
uint8_t | nvme_sq_empty (NvmeSQueue *sq) |
uint64_t * | nvme_setup_discontig (FemuCtrl *n, uint64_t prp_addr, uint16_t queue_depth, uint16_t entry_size) |
void | nvme_set_error_page (FemuCtrl *n, uint16_t sqid, uint16_t cid, uint16_t status, uint16_t location, uint64_t lba, uint32_t nsid) |
uint16_t | femu_nvme_rw_check_req (FemuCtrl *n, NvmeNamespace *ns, NvmeCmd *cmd, NvmeRequest *req, uint64_t slba, uint64_t elba, uint32_t nlb, uint16_t ctrl, uint64_t data_size, uint64_t meta_size) |
void | nvme_free_sq (NvmeSQueue *sq, FemuCtrl *n) |
uint16_t | nvme_init_sq (NvmeSQueue *sq, FemuCtrl *n, uint64_t dma_addr, uint16_t sqid, uint16_t cqid, uint16_t size, enum NvmeQueueFlags prio, int contig) |
初始化sq队列,预分配空间 更多... | |
uint16_t | nvme_init_cq (NvmeCQueue *cq, FemuCtrl *n, uint64_t dma_addr, uint16_t cqid, uint16_t vector, uint16_t size, uint16_t irq_enabled, int contig) |
void | nvme_free_cq (NvmeCQueue *cq, FemuCtrl *n) |
void | nvme_set_ctrl_name (FemuCtrl *n, const char *mn, const char *sn, int *dev_id) |
nvme工具函数定义
uint16_t femu_nvme_rw_check_req | ( | FemuCtrl * | n, |
NvmeNamespace * | ns, | ||
NvmeCmd * | cmd, | ||
NvmeRequest * | req, | ||
uint64_t | slba, | ||
uint64_t | elba, | ||
uint32_t | nlb, | ||
uint16_t | ctrl, | ||
uint64_t | data_size, | ||
uint64_t | meta_size | ||
) |
int nvme_check_cqid | ( | FemuCtrl * | n, |
uint16_t | cqid | ||
) |
int nvme_check_sqid | ( | FemuCtrl * | n, |
uint16_t | sqid | ||
) |
uint8_t nvme_cq_full | ( | NvmeCQueue * | cq | ) |
void nvme_free_cq | ( | NvmeCQueue * | cq, |
FemuCtrl * | n | ||
) |
void nvme_free_sq | ( | NvmeSQueue * | sq, |
FemuCtrl * | n | ||
) |
void nvme_inc_cq_tail | ( | NvmeCQueue * | cq | ) |
void nvme_inc_sq_head | ( | NvmeSQueue * | sq | ) |
uint16_t nvme_init_cq | ( | NvmeCQueue * | cq, |
FemuCtrl * | n, | ||
uint64_t | dma_addr, | ||
uint16_t | cqid, | ||
uint16_t | vector, | ||
uint16_t | size, | ||
uint16_t | irq_enabled, | ||
int | contig | ||
) |
uint16_t nvme_init_sq | ( | NvmeSQueue * | sq, |
FemuCtrl * | n, | ||
uint64_t | dma_addr, | ||
uint16_t | sqid, | ||
uint16_t | cqid, | ||
uint16_t | size, | ||
enum NvmeQueueFlags | prio, | ||
int | contig | ||
) |
初始化sq队列,预分配空间
void nvme_set_ctrl_name | ( | FemuCtrl * | n, |
const char * | mn, | ||
const char * | sn, | ||
int * | dev_id | ||
) |
void nvme_set_error_page | ( | FemuCtrl * | n, |
uint16_t | sqid, | ||
uint16_t | cid, | ||
uint16_t | status, | ||
uint16_t | location, | ||
uint64_t | lba, | ||
uint32_t | nsid | ||
) |
uint64_t* nvme_setup_discontig | ( | FemuCtrl * | n, |
uint64_t | prp_addr, | ||
uint16_t | queue_depth, | ||
uint16_t | entry_size | ||
) |
uint8_t nvme_sq_empty | ( | NvmeSQueue * | sq | ) |
void nvme_update_cq_head | ( | NvmeCQueue * | cq | ) |
void nvme_update_sq_tail | ( | NvmeSQueue * | sq | ) |