Commit 447cee86 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvmf: drop NVMF_{H2C,C2H}_MAX_MSG #defines



Use the size of the applicable structs directly.

Change-Id: I4a65de548d409c9962b11a75d3fde2bfe434a3ec
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent d8efd714
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -53,9 +53,6 @@ union nvmf_c2h_msg {
};
SPDK_STATIC_ASSERT(sizeof(union nvmf_c2h_msg) == 16, "Incorrect size");

#define NVMF_H2C_MAX_MSG (sizeof(union nvmf_h2c_msg))
#define NVMF_C2H_MAX_MSG (sizeof(union nvmf_c2h_msg))

struct spdk_nvmf_request {
	struct spdk_nvmf_conn		*conn;
	uint32_t			length;
+4 −4
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ nvmf_init_discovery_session_properties(struct nvmf_session *session)
	session->vcdata.lpa.edlp = 1;
	session->vcdata.cntlid = 0; /* There is one controller per subsystem, so its id is 0 */
	nvmfdata = (struct spdk_nvmf_extended_identify_ctrlr_data *)session->vcdata.nvmf_specific;
	nvmfdata->ioccsz = (NVMF_H2C_MAX_MSG / 16);
	nvmfdata->iorcsz = (NVMF_C2H_MAX_MSG / 16);
	nvmfdata->ioccsz = sizeof(struct spdk_nvme_cmd) / 16;
	nvmfdata->iorcsz = sizeof(struct spdk_nvme_cpl) / 16;
	nvmfdata->icdoff = 0; /* offset starts directly after SQE */
	nvmfdata->ctrattr = 0; /* dynamic controller model */
	nvmfdata->msdbd = 1; /* target supports single SGL in capsule */
@@ -106,8 +106,8 @@ nvmf_init_nvme_session_properties(struct nvmf_session *session)
	session->vcdata.sgls.sgl_offset = 1;

	nvmfdata = (struct spdk_nvmf_extended_identify_ctrlr_data *)session->vcdata.nvmf_specific;
	nvmfdata->ioccsz = (NVMF_H2C_MAX_MSG / 16);
	nvmfdata->iorcsz = (NVMF_C2H_MAX_MSG / 16);
	nvmfdata->ioccsz = sizeof(struct spdk_nvme_cmd) / 16;
	nvmfdata->iorcsz = sizeof(struct spdk_nvme_cpl) / 16;
	nvmfdata->icdoff = 0; /* offset starts directly after SQE */
	nvmfdata->ctrattr = 0; /* dynamic controller model */
	nvmfdata->msdbd = 1; /* target supports single SGL in capsule */