lib/iscsi: Remove unnecessary declaration of remove_acked_pdu()
Remove unnecessary declaration of remove_acked_pdu(), and move it down to just above the caller, spdk_iscsi_execute(). Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I4af2c9707735669f3baac1fa6fee9bcaaa1cd64f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470263 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
28dda0c016
commit
5dd0e54d7e
@ -81,8 +81,6 @@ static int create_iscsi_sess(struct spdk_iscsi_conn *conn,
|
|||||||
static uint8_t append_iscsi_sess(struct spdk_iscsi_conn *conn,
|
static uint8_t append_iscsi_sess(struct spdk_iscsi_conn *conn,
|
||||||
const char *initiator_port_name, uint16_t tsih, uint16_t cid);
|
const char *initiator_port_name, uint16_t tsih, uint16_t cid);
|
||||||
|
|
||||||
static void remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN);
|
|
||||||
|
|
||||||
static int iscsi_reject(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu,
|
static int iscsi_reject(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu,
|
||||||
int reason);
|
int reason);
|
||||||
|
|
||||||
@ -4216,23 +4214,6 @@ iscsi_op_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is used to refree the pdu when it is acknowledged */
|
|
||||||
static void
|
|
||||||
remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN)
|
|
||||||
{
|
|
||||||
struct spdk_iscsi_pdu *pdu, *pdu_temp;
|
|
||||||
uint32_t stat_sn;
|
|
||||||
|
|
||||||
conn->exp_statsn = DMIN32(ExpStatSN, conn->StatSN);
|
|
||||||
TAILQ_FOREACH_SAFE(pdu, &conn->snack_pdu_list, tailq, pdu_temp) {
|
|
||||||
stat_sn = from_be32(&pdu->bhs.stat_sn);
|
|
||||||
if (SN32_LT(stat_sn, conn->exp_statsn)) {
|
|
||||||
TAILQ_REMOVE(&conn->snack_pdu_list, pdu, tailq);
|
|
||||||
spdk_iscsi_conn_free_pdu(conn, pdu);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iscsi_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
iscsi_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||||
{
|
{
|
||||||
@ -4429,6 +4410,23 @@ iscsi_pdu_dump(struct spdk_iscsi_pdu *pdu)
|
|||||||
SPDK_ERRLOGDUMP("PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN);
|
SPDK_ERRLOGDUMP("PDU", (uint8_t *)&pdu->bhs, ISCSI_BHS_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This function is used to refree the pdu when it is acknowledged */
|
||||||
|
static void
|
||||||
|
remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN)
|
||||||
|
{
|
||||||
|
struct spdk_iscsi_pdu *pdu, *pdu_temp;
|
||||||
|
uint32_t stat_sn;
|
||||||
|
|
||||||
|
conn->exp_statsn = DMIN32(ExpStatSN, conn->StatSN);
|
||||||
|
TAILQ_FOREACH_SAFE(pdu, &conn->snack_pdu_list, tailq, pdu_temp) {
|
||||||
|
stat_sn = from_be32(&pdu->bhs.stat_sn);
|
||||||
|
if (SN32_LT(stat_sn, conn->exp_statsn)) {
|
||||||
|
TAILQ_REMOVE(&conn->snack_pdu_list, pdu, tailq);
|
||||||
|
spdk_iscsi_conn_free_pdu(conn, pdu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
spdk_iscsi_execute(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user