NVMe-oF: add asserts for SGE counts
We should never be going over these limits in the respective transports, but add asserts to check this during testing. Change-Id: Ifcaa82ccf58546a38020b31df54ee5d1d9822b8b Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/442777 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
f4d6841ba3
commit
b7651b681c
@ -1278,6 +1278,8 @@ spdk_nvmf_rdma_request_fill_iovs(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
i++;
|
||||
}
|
||||
|
||||
assert(rdma_req->req.iovcnt <= rqpair->max_send_sge);
|
||||
|
||||
rdma_req->data_from_pool = true;
|
||||
|
||||
return rc;
|
||||
|
@ -2116,6 +2116,7 @@ spdk_nvmf_tcp_req_fill_iovs(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
i++;
|
||||
}
|
||||
|
||||
assert(tcp_req->req.iovcnt < SPDK_NVMF_MAX_SGL_ENTRIES);
|
||||
tcp_req->data_from_pool = true;
|
||||
return 0;
|
||||
|
||||
|
@ -128,6 +128,7 @@ test_spdk_nvmf_rdma_request_parse_sgl(void)
|
||||
group.group.buf_cache_count = 0;
|
||||
poller.group = &group;
|
||||
rqpair.poller = &poller;
|
||||
rqpair.max_send_sge = SPDK_NVMF_MAX_SGL_ENTRIES;
|
||||
|
||||
sgl = &cmd.nvme_cmd.dptr.sgl1;
|
||||
rdma_req.recv = &recv;
|
||||
|
Loading…
Reference in New Issue
Block a user