diff --git a/include/spdk/nvmf_spec.h b/include/spdk/nvmf_spec.h index 30271361d..cca43447e 100644 --- a/include/spdk/nvmf_spec.h +++ b/include/spdk/nvmf_spec.h @@ -192,15 +192,6 @@ struct spdk_nvmf_fabric_auth_recv_cmd { }; SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_auth_recv_cmd) == 64, "Incorrect size"); -struct spdk_nvmf_fabric_auth_recv_rsp { - uint8_t reserved0[8]; - uint16_t sqhd; - uint8_t reserved1[2]; - uint16_t cid; - struct spdk_nvme_status status; -}; -SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_auth_recv_rsp) == 16, "Incorrect size"); - struct spdk_nvmf_fabric_auth_send_cmd { uint8_t opcode; uint8_t reserved1; @@ -217,15 +208,6 @@ struct spdk_nvmf_fabric_auth_send_cmd { }; SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_auth_send_cmd) == 64, "Incorrect size"); -struct spdk_nvmf_fabric_auth_send_rsp { - uint8_t reserved0[8]; - uint16_t sqhd; - uint8_t reserved1[2]; - uint16_t cid; - struct spdk_nvme_status status; -}; -SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_auth_send_rsp) == 16, "Incorrect size"); - struct spdk_nvmf_fabric_connect_data { uint8_t hostid[16]; uint16_t cntlid; @@ -236,12 +218,6 @@ struct spdk_nvmf_fabric_connect_data { }; SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_connect_data) == 1024, "Incorrect size"); -#define SPDK_NVMF_CONNECT_ATTR_PRIORITY_URGENT 0x00 -#define SPDK_NVMF_CONNECT_ATTR_PRIORITY_HIGH 0x01 -#define SPDK_NVMF_CONNECT_ATTR_PRIORITY_MEDIUM 0x02 -#define SPDK_NVMF_CONNECT_ATTR_PRIORITY_LOW 0x03 -#define SPDK_NVMF_CONNECT_ATTR_RESERVED 0xFC - struct spdk_nvmf_fabric_connect_cmd { uint8_t opcode; uint8_t reserved1; @@ -343,15 +319,6 @@ struct spdk_nvmf_fabric_prop_set_cmd { }; SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_prop_set_cmd) == 64, "Incorrect size"); -struct spdk_nvmf_fabric_prop_set_rsp { - uint8_t reserved0[8]; - uint16_t sqhd; - uint16_t reserved1; - uint16_t cid; - struct spdk_nvme_status status; -}; -SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_fabric_prop_set_rsp) == 16, "Incorrect size"); - struct spdk_nvmf_extended_identify_ctrlr_data { uint32_t ioccsz; uint32_t iorcsz; @@ -365,24 +332,6 @@ SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_extended_identify_ctrlr_data) == 256, #define SPDK_NVMF_NQN_MAX_LEN 223 #define SPDK_NVMF_DISCOVERY_NQN "nqn.2014-08.org.nvmexpress.discovery" -struct spdk_nvmf_discovery_identify_data { - uint8_t reserved0[64]; - uint64_t fr; - uint8_t reserved1[5]; - uint8_t mdts; - uint16_t cntlid; - uint32_t ver; - uint8_t reserved2[177]; - uint8_t lpa; - uint8_t elpe; - uint8_t reserved3[505]; - uint8_t subnqn[256]; - uint8_t discovery[1024]; - uint8_t reserved4[1024]; - uint8_t vs[1024]; -}; -SPDK_STATIC_ASSERT(sizeof(struct spdk_nvmf_discovery_identify_data) == 4096, "Incorrect size"); - /** RDMA transport-specific address subtype */ struct spdk_nvmf_rdma_transport_specific_address_subtype { /** RDMA QP service type (\ref spdk_nvmf_rdma_qptype) */ diff --git a/lib/nvmf/request.c b/lib/nvmf/request.c index 545f374ae..45c72b846 100644 --- a/lib/nvmf/request.c +++ b/lib/nvmf/request.c @@ -370,14 +370,12 @@ nvmf_process_property_get(struct spdk_nvmf_request *req) static bool nvmf_process_property_set(struct spdk_nvmf_request *req) { - struct spdk_nvmf_fabric_prop_set_rsp *response; struct spdk_nvmf_fabric_prop_set_cmd *cmd; bool shutdown = false; cmd = &req->cmd->prop_set_cmd; - response = &req->rsp->prop_set_rsp; - nvmf_property_set(req->conn->sess, cmd, response, &shutdown); + nvmf_property_set(req->conn->sess, cmd, &req->rsp->nvme_cpl, &shutdown); /* TODO: This is not right. It should shut down the whole session. if (shutdown == true) { diff --git a/lib/nvmf/request.h b/lib/nvmf/request.h index 6601291b2..3707b1e53 100644 --- a/lib/nvmf/request.h +++ b/lib/nvmf/request.h @@ -48,7 +48,6 @@ SPDK_STATIC_ASSERT(sizeof(union nvmf_h2c_msg) == 64, "Incorrect size"); union nvmf_c2h_msg { struct spdk_nvme_cpl nvme_cpl; - struct spdk_nvmf_fabric_prop_set_rsp prop_set_rsp; struct spdk_nvmf_fabric_prop_get_rsp prop_get_rsp; struct spdk_nvmf_fabric_connect_rsp connect_rsp; }; diff --git a/lib/nvmf/session.c b/lib/nvmf/session.c index e36fe3d40..3dd91526f 100644 --- a/lib/nvmf/session.c +++ b/lib/nvmf/session.c @@ -423,7 +423,7 @@ nvmf_property_get(struct nvmf_session *session, void nvmf_property_set(struct nvmf_session *session, struct spdk_nvmf_fabric_prop_set_cmd *cmd, - struct spdk_nvmf_fabric_prop_set_rsp *response, + struct spdk_nvme_cpl *response, bool *shutdown) { const struct nvmf_prop *prop; diff --git a/lib/nvmf/session.h b/lib/nvmf/session.h index 9a163445e..446331066 100644 --- a/lib/nvmf/session.h +++ b/lib/nvmf/session.h @@ -100,7 +100,7 @@ nvmf_property_get(struct nvmf_session *session, void nvmf_property_set(struct nvmf_session *session, struct spdk_nvmf_fabric_prop_set_cmd *cmd, - struct spdk_nvmf_fabric_prop_set_rsp *response, + struct spdk_nvme_cpl *rsp, bool *shutdown); int spdk_nvmf_session_poll(struct nvmf_session *session);