diff --git a/include/spdk_internal/nvme_tcp.h b/include/spdk_internal/nvme_tcp.h index c7e19a9e2..6893586ce 100644 --- a/include/spdk_internal/nvme_tcp.h +++ b/include/spdk_internal/nvme_tcp.h @@ -93,7 +93,6 @@ struct nvme_tcp_pdu { uint32_t ch_valid_bytes; uint32_t psh_valid_bytes; - bool hd_is_read; uint32_t data_valid_bytes; nvme_tcp_qpair_xfer_complete_cb cb_fn; diff --git a/lib/nvmf/tcp.c b/lib/nvmf/tcp.c index 7a8fe333b..841574359 100644 --- a/lib/nvmf/tcp.c +++ b/lib/nvmf/tcp.c @@ -1938,7 +1938,7 @@ spdk_nvmf_tcp_sock_process(struct nvme_tcp_qpair *tqpair) /* Wait for the pdu specific header */ case NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PSH: pdu = &tqpair->pdu_in_progress; - if (pdu->hd_is_read) { + if (pdu->tcp_req) { break; } @@ -1977,8 +1977,6 @@ spdk_nvmf_tcp_sock_process(struct nvme_tcp_qpair *tqpair) } } - pdu->hd_is_read = true; - /* All header(ch, psh, head digist) of this PDU has now been read from the socket. */ spdk_nvmf_tcp_pdu_psh_handle(tqpair); break;