FEMU  原版 master 7e238cc
FEMU: Accurate, Scalable and Extensible NVMe SSD Emulator (FAST'18)
nvme-admin.c 文件参考

nvme处理admin command相关操作 更多...

#include "./nvme.h"
nvme-admin.c 的引用(Include)关系图:

宏定义

#define NVME_IDENTIFY_DATA_SIZE   4096
 

函数

static uint16_t nvme_del_sq (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_create_sq (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_create_cq (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_del_cq (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_set_db_memory (FemuCtrl *n, const NvmeCmd *cmd)
 
static bool nvme_nsid_valid (FemuCtrl *n, uint32_t nsid)
 
static NvmeNamespacenvme_ns (FemuCtrl *n, uint32_t nsid)
 
static uint16_t nvme_rpt_empty_id_struct (FemuCtrl *n, NvmeCmd *cmd)
 
static bool nvme_csi_has_nvm_support (NvmeNamespace *ns)
 
static uint16_t nvme_identify_ns (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_ns_csi (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_ctrl (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_ctrl_csi (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_nslist (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_nslist_csi (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_ns_descr_list (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify_cmd_set (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_identify (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_get_feature (FemuCtrl *n, NvmeCmd *cmd, NvmeCqe *cqe)
 
static uint16_t nvme_set_feature (FemuCtrl *n, NvmeCmd *cmd, NvmeCqe *cqe)
 
static uint16_t nvme_fw_log_info (FemuCtrl *n, NvmeCmd *cmd, uint32_t buf_len)
 
static uint16_t nvme_error_log_info (FemuCtrl *n, NvmeCmd *cmd, uint32_t buf_len)
 
static uint16_t nvme_smart_info (FemuCtrl *n, NvmeCmd *cmd, uint32_t buf_len)
 
static uint16_t nvme_cmd_effects (FemuCtrl *n, NvmeCmd *cmd, uint8_t csi, uint32_t buf_len, uint64_t off)
 
static uint16_t nvme_get_log (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_abort_req (FemuCtrl *n, NvmeCmd *cmd, uint32_t *result)
 
static uint16_t nvme_format_namespace (NvmeNamespace *ns, uint8_t lba_idx, uint8_t meta_loc, uint8_t pil, uint8_t pi, uint8_t sec_erase)
 
static uint16_t nvme_format (FemuCtrl *n, NvmeCmd *cmd)
 
static uint16_t nvme_admin_cmd (FemuCtrl *n, NvmeCmd *cmd, NvmeCqe *cqe)
 识别、执行admin命令 更多...
 
void nvme_process_sq_admin (void *opaque)
 处理admin命令的sq队列 更多...
 

变量

static const uint32_t nvme_cse_acs [256]
 
static const uint32_t nvme_cse_iocs_nvm [256]
 
static const uint32_t nvme_cse_iocs_zoned [256]
 

详细描述

nvme处理admin command相关操作

宏定义说明

◆ NVME_IDENTIFY_DATA_SIZE

#define NVME_IDENTIFY_DATA_SIZE   4096

函数说明

◆ nvme_abort_req()

static uint16_t nvme_abort_req ( FemuCtrl n,
NvmeCmd cmd,
uint32_t *  result 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_admin_cmd()

static uint16_t nvme_admin_cmd ( FemuCtrl n,
NvmeCmd cmd,
NvmeCqe cqe 
)
static

识别、执行admin命令

参数
n
cmd
cqe
返回
uint16_t
函数调用图:
这是这个函数的调用关系图:

◆ nvme_cmd_effects()

static uint16_t nvme_cmd_effects ( FemuCtrl n,
NvmeCmd cmd,
uint8_t  csi,
uint32_t  buf_len,
uint64_t  off 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_create_cq()

static uint16_t nvme_create_cq ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_create_sq()

static uint16_t nvme_create_sq ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_csi_has_nvm_support()

static bool nvme_csi_has_nvm_support ( NvmeNamespace ns)
inlinestatic
这是这个函数的调用关系图:

◆ nvme_del_cq()

static uint16_t nvme_del_cq ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_del_sq()

static uint16_t nvme_del_sq ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_error_log_info()

static uint16_t nvme_error_log_info ( FemuCtrl n,
NvmeCmd cmd,
uint32_t  buf_len 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_format()

static uint16_t nvme_format ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_format_namespace()

static uint16_t nvme_format_namespace ( NvmeNamespace ns,
uint8_t  lba_idx,
uint8_t  meta_loc,
uint8_t  pil,
uint8_t  pi,
uint8_t  sec_erase 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_fw_log_info()

static uint16_t nvme_fw_log_info ( FemuCtrl n,
NvmeCmd cmd,
uint32_t  buf_len 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_get_feature()

static uint16_t nvme_get_feature ( FemuCtrl n,
NvmeCmd cmd,
NvmeCqe cqe 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_get_log()

static uint16_t nvme_get_log ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify()

static uint16_t nvme_identify ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_cmd_set()

static uint16_t nvme_identify_cmd_set ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_ctrl()

static uint16_t nvme_identify_ctrl ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_ctrl_csi()

static uint16_t nvme_identify_ctrl_csi ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_ns()

static uint16_t nvme_identify_ns ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_ns_csi()

static uint16_t nvme_identify_ns_csi ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_ns_descr_list()

static uint16_t nvme_identify_ns_descr_list ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_nslist()

static uint16_t nvme_identify_nslist ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_identify_nslist_csi()

static uint16_t nvme_identify_nslist_csi ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_ns()

static NvmeNamespace* nvme_ns ( FemuCtrl n,
uint32_t  nsid 
)
inlinestatic
这是这个函数的调用关系图:

◆ nvme_nsid_valid()

static bool nvme_nsid_valid ( FemuCtrl n,
uint32_t  nsid 
)
static
这是这个函数的调用关系图:

◆ nvme_process_sq_admin()

void nvme_process_sq_admin ( void *  opaque)

处理admin命令的sq队列

参数
opaque
函数调用图:
这是这个函数的调用关系图:

◆ nvme_rpt_empty_id_struct()

static uint16_t nvme_rpt_empty_id_struct ( FemuCtrl n,
NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_set_db_memory()

static uint16_t nvme_set_db_memory ( FemuCtrl n,
const NvmeCmd cmd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_set_feature()

static uint16_t nvme_set_feature ( FemuCtrl n,
NvmeCmd cmd,
NvmeCqe cqe 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_smart_info()

static uint16_t nvme_smart_info ( FemuCtrl n,
NvmeCmd cmd,
uint32_t  buf_len 
)
static
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ nvme_cse_acs

◆ nvme_cse_iocs_nvm

◆ nvme_cse_iocs_zoned

NVME_CMD_ZONE_MGMT_SEND
@ NVME_CMD_ZONE_MGMT_SEND
Definition: nvme.h:346
NVME_CMD_EFF_LBCC
@ NVME_CMD_EFF_LBCC
Definition: nvme.h:648
NVME_CMD_DSM
@ NVME_CMD_DSM
Definition: nvme.h:345
NVME_ADM_CMD_CREATE_SQ
@ NVME_ADM_CMD_CREATE_SQ
Definition: nvme.h:319
NVME_ADM_CMD_DELETE_SQ
@ NVME_ADM_CMD_DELETE_SQ
Definition: nvme.h:318
NVME_CMD_FLUSH
@ NVME_CMD_FLUSH
Definition: nvme.h:339
NVME_ADM_CMD_GET_LOG_PAGE
@ NVME_ADM_CMD_GET_LOG_PAGE
Definition: nvme.h:320
NVME_ADM_CMD_DELETE_CQ
@ NVME_ADM_CMD_DELETE_CQ
Definition: nvme.h:321
NVME_CMD_COMPARE
@ NVME_CMD_COMPARE
Definition: nvme.h:343
NVME_CMD_EFF_CSUPP
@ NVME_CMD_EFF_CSUPP
Definition: nvme.h:647
NVME_CMD_WRITE
@ NVME_CMD_WRITE
Definition: nvme.h:340
NVME_CMD_ZONE_MGMT_RECV
@ NVME_CMD_ZONE_MGMT_RECV
Definition: nvme.h:347
NVME_ADM_CMD_GET_FEATURES
@ NVME_ADM_CMD_GET_FEATURES
Definition: nvme.h:326
NVME_CMD_WRITE_ZEROES
@ NVME_CMD_WRITE_ZEROES
Definition: nvme.h:344
NVME_ADM_CMD_CREATE_CQ
@ NVME_ADM_CMD_CREATE_CQ
Definition: nvme.h:322
NVME_ADM_CMD_ASYNC_EV_REQ
@ NVME_ADM_CMD_ASYNC_EV_REQ
Definition: nvme.h:327
NVME_CMD_ZONE_APPEND
@ NVME_CMD_ZONE_APPEND
Definition: nvme.h:348
NVME_ADM_CMD_IDENTIFY
@ NVME_ADM_CMD_IDENTIFY
Definition: nvme.h:323
NVME_CMD_READ
@ NVME_CMD_READ
Definition: nvme.h:341
NVME_ADM_CMD_SET_FEATURES
@ NVME_ADM_CMD_SET_FEATURES
Definition: nvme.h:325
NVME_ADM_CMD_ABORT
@ NVME_ADM_CMD_ABORT
Definition: nvme.h:324