nvmf/tcp: Use nvme_tcp_pdu_set_data_buf for incapsule data
Previously we had used nvme_tcp_pdu_set_data() for incapsule data. This patch changes handling incapsule data to use nvme_tcp_pdu_set_data_buf() as same as H2C and C2H. This unification is necessary to support DIF insert and strip in NVMe/TCP target later. Change-Id: I02cae8db94e51cf79a354dd64ad45f0e491ec08e Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455920 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
16b8519660
commit
127cfac020
@ -2323,7 +2323,8 @@ spdk_nvmf_tcp_pdu_set_buf_from_req(struct spdk_nvmf_tcp_qpair *tqpair,
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "Not need to send r2t for tcp_req(%p) on tqpair=%p\n", tcp_req,
|
||||
tqpair);
|
||||
/* No need to send r2t, contained in the capsuled data */
|
||||
nvme_tcp_pdu_set_data(pdu, tcp_req->req.data, tcp_req->req.length);
|
||||
nvme_tcp_pdu_set_data_buf(pdu, tcp_req->req.iov, tcp_req->req.iovcnt,
|
||||
0, tcp_req->req.length);
|
||||
spdk_nvmf_tcp_qpair_set_recv_state(tqpair, NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PAYLOAD);
|
||||
spdk_nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_TRANSFERRING_HOST_TO_CONTROLLER);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user