lib/iscsi: Add real callback for DATAIN PDU complete
Since only after DATAIN pdu sending out, we can have free slot to handle queued data in tasks. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: I49a52597e8660453ea90c5960d020eb53f81265d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482048 Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
098d32273a
commit
d8d1168c06
@ -313,7 +313,6 @@ spdk_iscsi_conn_free_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd
|
|||||||
|
|
||||||
if (pdu->task) {
|
if (pdu->task) {
|
||||||
spdk_iscsi_task_put(pdu->task);
|
spdk_iscsi_task_put(pdu->task);
|
||||||
spdk_iscsi_conn_handle_queued_datain_tasks(conn);
|
|
||||||
}
|
}
|
||||||
spdk_put_pdu(pdu);
|
spdk_put_pdu(pdu);
|
||||||
|
|
||||||
|
|||||||
@ -2881,6 +2881,14 @@ get_transfer_task(struct spdk_iscsi_conn *conn, uint32_t transfer_tag)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
spdk_iscsi_conn_datain_pdu_complete(void *arg)
|
||||||
|
{
|
||||||
|
struct spdk_iscsi_conn *conn = arg;
|
||||||
|
|
||||||
|
spdk_iscsi_conn_handle_queued_datain_tasks(conn);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iscsi_send_datain(struct spdk_iscsi_conn *conn,
|
iscsi_send_datain(struct spdk_iscsi_conn *conn,
|
||||||
struct spdk_iscsi_task *task, int datain_flag,
|
struct spdk_iscsi_task *task, int datain_flag,
|
||||||
@ -2983,7 +2991,7 @@ iscsi_send_datain(struct spdk_iscsi_conn *conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_iscsi_conn_write_pdu(conn, rsp_pdu, spdk_iscsi_conn_pdu_generic_complete, NULL);
|
spdk_iscsi_conn_write_pdu(conn, rsp_pdu, spdk_iscsi_conn_datain_pdu_complete, conn);
|
||||||
|
|
||||||
return DataSN;
|
return DataSN;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user