nvmf: remove definitions that duplicate NVMe

These NVMf spec structure definitions are the same as the equivalent
NVMe structs.

Change-Id: I21c45973b7843e3767c48f97ec42e7b446df296f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-07-15 13:51:22 -07:00
parent 70601d5e0e
commit 543b6d0932
5 changed files with 3 additions and 57 deletions

View File

@ -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"); 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 { struct spdk_nvmf_fabric_auth_send_cmd {
uint8_t opcode; uint8_t opcode;
uint8_t reserved1; 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"); 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 { struct spdk_nvmf_fabric_connect_data {
uint8_t hostid[16]; uint8_t hostid[16];
uint16_t cntlid; 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"); 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 { struct spdk_nvmf_fabric_connect_cmd {
uint8_t opcode; uint8_t opcode;
uint8_t reserved1; 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"); 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 { struct spdk_nvmf_extended_identify_ctrlr_data {
uint32_t ioccsz; uint32_t ioccsz;
uint32_t iorcsz; 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_NQN_MAX_LEN 223
#define SPDK_NVMF_DISCOVERY_NQN "nqn.2014-08.org.nvmexpress.discovery" #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 */ /** RDMA transport-specific address subtype */
struct spdk_nvmf_rdma_transport_specific_address_subtype { struct spdk_nvmf_rdma_transport_specific_address_subtype {
/** RDMA QP service type (\ref spdk_nvmf_rdma_qptype) */ /** RDMA QP service type (\ref spdk_nvmf_rdma_qptype) */

View File

@ -370,14 +370,12 @@ nvmf_process_property_get(struct spdk_nvmf_request *req)
static bool static bool
nvmf_process_property_set(struct spdk_nvmf_request *req) 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; struct spdk_nvmf_fabric_prop_set_cmd *cmd;
bool shutdown = false; bool shutdown = false;
cmd = &req->cmd->prop_set_cmd; 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. /* TODO: This is not right. It should shut down the whole session.
if (shutdown == true) { if (shutdown == true) {

View File

@ -48,7 +48,6 @@ SPDK_STATIC_ASSERT(sizeof(union nvmf_h2c_msg) == 64, "Incorrect size");
union nvmf_c2h_msg { union nvmf_c2h_msg {
struct spdk_nvme_cpl nvme_cpl; 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_prop_get_rsp prop_get_rsp;
struct spdk_nvmf_fabric_connect_rsp connect_rsp; struct spdk_nvmf_fabric_connect_rsp connect_rsp;
}; };

View File

@ -423,7 +423,7 @@ nvmf_property_get(struct nvmf_session *session,
void void
nvmf_property_set(struct nvmf_session *session, nvmf_property_set(struct nvmf_session *session,
struct spdk_nvmf_fabric_prop_set_cmd *cmd, struct spdk_nvmf_fabric_prop_set_cmd *cmd,
struct spdk_nvmf_fabric_prop_set_rsp *response, struct spdk_nvme_cpl *response,
bool *shutdown) bool *shutdown)
{ {
const struct nvmf_prop *prop; const struct nvmf_prop *prop;

View File

@ -100,7 +100,7 @@ nvmf_property_get(struct nvmf_session *session,
void void
nvmf_property_set(struct nvmf_session *session, nvmf_property_set(struct nvmf_session *session,
struct spdk_nvmf_fabric_prop_set_cmd *cmd, struct spdk_nvmf_fabric_prop_set_cmd *cmd,
struct spdk_nvmf_fabric_prop_set_rsp *response, struct spdk_nvme_cpl *rsp,
bool *shutdown); bool *shutdown);
int spdk_nvmf_session_poll(struct nvmf_session *session); int spdk_nvmf_session_poll(struct nvmf_session *session);