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: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470531 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
83ffb2075e
commit
34385d80a3
@ -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 {
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user