nvme/tcp: Rename pdu->ctx to pdu->req

This is always the request pointer, so rename it for clarity.

Change-Id: Ifbda7db7787c65f0deb190a1e94f0676b2c0d99a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470530
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Ben Walker 2019-10-01 13:45:35 -07:00 committed by Jim Harris
parent 78a11548da
commit 83ffb2075e
3 changed files with 7 additions and 7 deletions

View File

@ -124,7 +124,7 @@ struct nvme_tcp_pdu {
struct spdk_dif_ctx *dif_ctx;
void *ctx; /* data tied to a tcp request */
void *req; /* data tied to a tcp request */
};
enum nvme_tcp_pdu_recv_state {

View File

@ -866,7 +866,7 @@ nvme_tcp_c2h_data_payload_handle(struct nvme_tcp_qpair *tqpair,
struct spdk_nvme_cpl cpl = {};
uint8_t flags;
tcp_req = pdu->ctx;
tcp_req = pdu->req;
assert(tcp_req != NULL);
SPDK_DEBUGLOG(SPDK_LOG_NVME, "enter\n");
@ -1130,7 +1130,7 @@ nvme_tcp_c2h_data_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_pdu
nvme_tcp_pdu_set_data_buf(pdu, tcp_req->iov, tcp_req->iovcnt,
c2h_data->datao, c2h_data->datal);
pdu->ctx = tcp_req;
pdu->req = tcp_req;
nvme_tcp_qpair_set_recv_state(tqpair, NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PAYLOAD);
return;

View File

@ -1369,7 +1369,7 @@ spdk_nvmf_tcp_capsule_cmd_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
return;
}
pdu->ctx = tcp_req;
pdu->req = tcp_req;
spdk_nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_NEW);
spdk_nvmf_tcp_req_process(ttransport, tcp_req);
return;
@ -1386,7 +1386,7 @@ spdk_nvmf_tcp_capsule_cmd_payload_handle(struct spdk_nvmf_tcp_transport *ttransp
enum spdk_nvme_tcp_term_req_fes fes;
capsule_cmd = &pdu->hdr->capsule_cmd;
tcp_req = pdu->ctx;
tcp_req = pdu->req;
assert(tcp_req != NULL);
if (capsule_cmd->common.pdo > SPDK_NVME_TCP_PDU_PDO_MAX_OFFSET) {
SPDK_ERRLOG("Expected ICReq capsule_cmd pdu offset <= %d, got %c\n",
@ -1467,7 +1467,7 @@ spdk_nvmf_tcp_h2c_data_hdr_handle(struct spdk_nvmf_tcp_transport *ttransport,
goto err;
}
pdu->ctx = tcp_req;
pdu->req = tcp_req;
if (spdk_unlikely(tcp_req->req.dif.dif_insert_or_strip)) {
pdu->dif_ctx = &tcp_req->req.dif.dif_ctx;
@ -1580,7 +1580,7 @@ spdk_nvmf_tcp_h2c_data_payload_handle(struct spdk_nvmf_tcp_transport *ttransport
{
struct spdk_nvmf_tcp_req *tcp_req;
tcp_req = pdu->ctx;
tcp_req = pdu->req;
assert(tcp_req != NULL);
SPDK_DEBUGLOG(SPDK_LOG_NVMF_TCP, "enter\n");