Commit 34385d80 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

nvmf/tcp: Add pointer to qpair from PDU



It's important to be able to recover full context from just
the PDU in the future.

Change-Id: I3d1f3c326299b1237b42dbe33d340a282c3bc5bb
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470531


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 83ffb207
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ struct nvme_tcp_pdu {
	struct spdk_dif_ctx				*dif_ctx;

	void						*req; /* data tied to a tcp request */
	void						*qpair;
};

enum nvme_tcp_pdu_recv_state {
+1 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ spdk_nvmf_tcp_pdu_get(struct spdk_nvmf_tcp_qpair *tqpair)
	tqpair->free_pdu_num--;
	TAILQ_REMOVE(&tqpair->free_queue, pdu, tailq);
	memset(pdu, 0, sizeof(*pdu));
	pdu->qpair = tqpair;
	pdu->ref = 1;
	pdu->hdr = &pdu->hdr_mem;