nvmf/tcp: Move setting orig_length to the location the value is fixed at
tcp_req->orig_length had been set just before I/O submission but the value is already fixed in spdk_nvmf_tcp_req_parse_sgl(). Hence move setting tcp_req->orig_length accordingly. This follows the good practice of RDMA transport. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I99f6e266d8f7027bce810864314f3ee24a1af10c Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468910 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
a41fb6e65a
commit
ddd97a8b3b
@ -2246,6 +2246,7 @@ spdk_nvmf_tcp_req_parse_sgl(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Data requested length= 0x%x\n", length);
|
||||
|
||||
if (spdk_unlikely(tcp_req->dif_insert_or_strip)) {
|
||||
tcp_req->orig_length = length;
|
||||
length = spdk_dif_get_length_with_md(length, &tcp_req->dif_ctx);
|
||||
tcp_req->elba_length = length;
|
||||
}
|
||||
@ -2631,7 +2632,6 @@ spdk_nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
|
||||
if (spdk_unlikely(tcp_req->dif_insert_or_strip)) {
|
||||
assert(tcp_req->elba_length >= tcp_req->req.length);
|
||||
tcp_req->orig_length = tcp_req->req.length;
|
||||
tcp_req->req.length = tcp_req->elba_length;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user