Commit 543b6d09 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 70601d5e
Loading
Loading
Loading
Loading
+0 −51
Original line number Diff line number Diff line
@@ -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) */
+1 −3
Original line number Diff line number Diff line
@@ -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) {
+0 −1
Original line number Diff line number Diff line
@@ -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;
};
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);