12#ifndef _PACKET_NVME_H_
13#define _PACKET_NVME_H_
15#define NVME_CMD_SIZE 64
16#define NVME_CQE_SIZE 16
18#define NVME_FABRIC_OPC 0x7F
19#define NVME_FCTYPE_PROP_SET 0x0
20#define NVME_FCTYPE_CONNECT 0x1
21#define NVME_FCTYPE_PROP_GET 0x4
22#define NVME_FCTYPE_AUTH_SEND 0x5
23#define NVME_FCTYPE_AUTH_RECV 0x6
24#define NVME_FCTYPE_DISCONNECT 0x8
33#define NVME_AQ_OPC_DELETE_SQ 0x00
34#define NVME_AQ_OPC_CREATE_SQ 0x01
35#define NVME_AQ_OPC_GET_LOG_PAGE 0x02
36#define NVME_AQ_OPC_DELETE_CQ 0x04
37#define NVME_AQ_OPC_CREATE_CQ 0x05
38#define NVME_AQ_OPC_IDENTIFY 0x06
39#define NVME_AQ_OPC_ABORT 0x08
40#define NVME_AQ_OPC_SET_FEATURES 0x09
41#define NVME_AQ_OPC_GET_FEATURES 0x0a
42#define NVME_AQ_OPC_ASYNC_EVE_REQ 0x0c
43#define NVME_AQ_OPC_NS_MGMT 0x0d
44#define NVME_AQ_OPC_FW_COMMIT 0x10
45#define NVME_AQ_OPC_FW_IMG_DOWNLOAD 0x11
46#define NVME_AQ_OPC_SELF_TEST 0x14
47#define NVME_AQ_OPC_NS_ATTACH 0x15
48#define NVME_AQ_OPC_KEEP_ALIVE 0x18
49#define NVME_AQ_OPC_VIRT_MGMT 0x1c
50#define NVME_AQ_OPC_CAP_MGMT 0x20
51#define NVME_AQ_OPC_LOCKDOWN 0x24
52#define NVME_AQ_OPC_CLEAR_EXP_NVM_CFG 0x28
53#define NVME_AQ_OPC_CREATE_EXP_NVM_SUBSYS 0x2a
54#define NVME_AQ_OPC_MANAGE_EXP_NVM_SUBSYS 0x2d
55#define NVME_AQ_OPC_MANAGE_EXP_NS 0x31
56#define NVME_AQ_OPC_MANAGE_EXP_PORT 0x35
57#define NVME_AQ_OPC_DBBUF_CONFIG 0x7c
58#define NVME_AQ_OPC_FORMAT_NVM 0x80
59#define NVME_AQ_OPC_SECURITY_SEND 0x81
60#define NVME_AQ_OPC_SECURITY_RECV 0x82
61#define NVME_AQ_OPC_SANITIZE 0x84
62#define NVME_AQ_OPC_GET_LBA_STATUS 0x86
63#define NVME_AQ_OPC_SANITIZE_NS 0x8c
65#define NVME_IDENTIFY_CNS_IDENTIFY_NS 0x0
66#define NVME_IDENTIFY_CNS_IDENTIFY_CTRL 0x1
67#define NVME_IDENTIFY_CNS_IDENTIFY_NSLIST 0x2
68#define NVME_IDENTIFY_CNS_NSID_DESC_LIST 0x3
69#define NVME_IDENTIFY_CNS_NVM_SET_LIST 0x4
70#define NVME_IDENTIFY_CNS_NS_ALLOC_LIST 0x10
71#define NVME_IDENTIFY_CNS_NS_ALLOC 0x11
72#define NVME_IDENTIFY_CNS_CTRL_LIST_NS 0x12
73#define NVME_IDENTIFY_CNS_CTRL_LIST 0x13
74#define NVME_IDENTIFY_CNS_PRI_CTRL_CAP 0x14
75#define NVME_IDENTIFY_CNS_SEC_CTRL_LIST 0x15
76#define NVME_IDENTIFY_CNS_NS_GRAN_LIST 0x16
77#define NVME_IDENTIFY_CNS_UUID_LIST 0x17
89#define NVME_CMD_MAX_TRS (16)
95 uint32_t data_req_pkt_num;
96 uint32_t data_tr_pkt_num[NVME_CMD_MAX_TRS];
97 uint32_t first_tr_psn;
113 unsigned tr_sub_entries;
138extern int hf_nvmeof_cmd_pkt;
139extern int hf_nvmeof_data_req;
141const char *get_nvmeof_cmd_string(uint8_t fctype);
144nvme_publish_qid(proto_tree *tree,
int field_index, uint16_t qid);
147nvme_publish_cmd_latency(proto_tree *tree,
struct nvme_cmd_ctx *cmd_ctx,
150nvme_publish_to_cmd_link(proto_tree *tree, tvbuff_t *tvb,
153nvme_publish_to_cqe_link(proto_tree *tree, tvbuff_t *tvb,
156nvme_publish_to_data_req_link(proto_tree *tree, tvbuff_t *tvb,
159nvme_publish_to_data_resp_link(proto_tree *tree, tvbuff_t *tvb,
162nvme_publish_link(proto_tree *tree, tvbuff_t *tvb,
int hf_index,
163 uint32_t pkt_no,
bool zero_ok);
170 void *ctx, uint16_t cmd_id);
171void* nvme_lookup_cmd_in_pending_list(
struct nvme_q_ctx *q_ctx, uint16_t cmd_id);
181dissect_nvmeof_fabric_cmd(tvbuff_t *nvme_tvb,
packet_info *pinfo, proto_tree *nvme_tree,
184dissect_nvmeof_cmd_data(tvbuff_t *data_tvb,
packet_info *pinfo, proto_tree *data_tree,
187dissect_nvmeof_fabric_cqe(tvbuff_t *nvme_tvb,
packet_info *pinfo,
188 proto_tree *nvme_tree,
200 struct nvme_cmd_ctx *cmd_ctx, uint32_t rkey, uint32_t frame_num);
202nvme_lookup_data_tr_pkt(
struct nvme_q_ctx *q_ctx,
203 uint32_t rkey, uint32_t frame_num);
206nvme_add_data_tr_off(
struct nvme_q_ctx *q_ctx, uint32_t off, uint32_t frame_num);
209nvme_lookup_data_tr_off(
struct nvme_q_ctx *q_ctx, uint32_t frame_num);
212nvme_add_cmd_cqe_to_done_list(
struct nvme_q_ctx *q_ctx,
218void dissect_nvme_cmd_sgl(tvbuff_t *cmd_tvb, proto_tree *cmd_tree,
int field_index,
222dissect_nvme_cmd(tvbuff_t *nvme_tvb,
packet_info *pinfo, proto_tree *root_tree,
228dissect_nvme_data_response(tvbuff_t *nvme_tvb,
packet_info *pinfo, proto_tree *root_tree,
232dissect_nvme_cqe(tvbuff_t *nvme_tvb,
packet_info *pinfo, proto_tree *root_tree,
240nvme_get_opcode_string(uint8_t opcode, uint16_t qid);
254nvme_dissect_admin_sqe_cdws(tvbuff_t *sqe_tvb,
packet_info *pinfo,
266nvme_dissect_admin_cqe_dw0(tvbuff_t *nvme_tvb,
int dw0_off, proto_tree *cqe_tree,
276nvme_dissect_cqe_status(tvbuff_t *nvme_tvb,
int status_off, proto_tree *cqe_tree);
289nvme_dissect_admin_data_resp(tvbuff_t *nvme_tvb, proto_tree *cmd_tree,
290 struct nvme_cmd_ctx *cmd_ctx,
unsigned off,
unsigned len);
298nvme_is_io_queue_opcode(uint8_t opcode);
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
struct _wmem_tree_t wmem_tree_t
Opaque type representing a red-black tree in the wmem system.
Definition wmem_tree.h:49
Definition packet-nvme.h:174
Definition packet-nvme.h:91
Definition packet-nvme.h:80
struct _value_string value_string
Mapping between a 32-bit integer value and its string representation.