nvmf: fix ioccsz (in-capsule data size)
Temporarily set the in-capsule data size to the maximum data transfer
length. This should actually be updated by the transport layer, but for
now, the only transport (RDMA) supports the full bounce buffer size.
Also drop the check that prevents admin connections from using
in-capsule data; the host may send in-capsule data for the Connect on an
I/O queue, and we don't know the type of connection until after Connect
is processed.
Fixes: 828dca7
("nvmf: Move some stray session init code to the right place")
Change-Id: I369ee5497247d7e875ad0b6f0aaf6c47c1d3887c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
6cd40b9946
commit
163127a65e
@ -513,11 +513,6 @@ spdk_nvmf_request_prep_data(struct spdk_nvmf_request *req,
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "In-capsule data: offset 0x%" PRIx64 ", length 0x%x\n",
|
||||
offset, sgl->unkeyed.length);
|
||||
|
||||
if (conn->type == CONN_TYPE_AQ) {
|
||||
SPDK_ERRLOG("In-capsule data not allowed for admin queue\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (offset > max_len) {
|
||||
SPDK_ERRLOG("In-capsule offset 0x%" PRIx64 " exceeds capsule length 0x%x\n",
|
||||
offset, max_len);
|
||||
|
@ -112,6 +112,9 @@ nvmf_init_nvme_session_properties(struct nvmf_session *session)
|
||||
nvmfdata->ctrattr = 0; /* dynamic controller model */
|
||||
nvmfdata->msdbd = 1; /* target supports single SGL in capsule */
|
||||
|
||||
/* TODO: this should be set by the transport */
|
||||
nvmfdata->ioccsz += SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE / 16;
|
||||
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, " ctrlr data: maxcmd %x\n",
|
||||
session->vcdata.maxcmd);
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, " ext ctrlr data: ioccsz %x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user