From c92ff6bf9157a185de28aa3bf4c545fc105e2ab0 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Thu, 17 Oct 2019 08:11:52 +0900 Subject: [PATCH] lib/iscsi: Insert _pdu_payload_ into name of PDU payload handlers Insert _pdu_payload_ into iscsi_op_login(), iscsi_op_text(), iscsi_op_scsi_read(), iscsi_op_scsi_write(), iscsi_op_scsi(), iscsi_op_nopout(), and iscsi_op_data() to clarify that they handle PDU payload. Signed-off-by: Shuhei Matsumoto Change-Id: Id28ea90948118321c7889084149083bcc6bbd27c Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471562 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu --- lib/iscsi/iscsi.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 568b48594..690619956 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -2193,7 +2193,7 @@ iscsi_pdu_hdr_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) } static int -iscsi_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) +iscsi_pdu_payload_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { int rc; struct iscsi_bhs_login_req *reqh; @@ -2306,7 +2306,7 @@ iscsi_pdu_hdr_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) } static int -iscsi_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) +iscsi_pdu_payload_op_text(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { struct iscsi_param *params = NULL; struct spdk_iscsi_pdu *rsp_pdu; @@ -3297,7 +3297,7 @@ int spdk_iscsi_conn_handle_queued_datain_tasks(struct spdk_iscsi_conn *conn) } static int -iscsi_op_scsi_read(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task) +iscsi_pdu_payload_op_scsi_read(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task) { int32_t remaining_size; @@ -3321,7 +3321,7 @@ iscsi_op_scsi_read(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task) } static int -iscsi_op_scsi_write(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task) +iscsi_pdu_payload_op_scsi_write(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task) { struct spdk_iscsi_pdu *pdu; struct iscsi_bhs_scsi_req *reqh; @@ -3482,7 +3482,7 @@ iscsi_pdu_hdr_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) } static int -iscsi_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) +iscsi_pdu_payload_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { struct spdk_iscsi_task *task; @@ -3500,9 +3500,9 @@ iscsi_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) switch (task->scsi.dxfer_dir) { case SPDK_SCSI_DIR_FROM_DEV: - return iscsi_op_scsi_read(conn, task); + return iscsi_pdu_payload_op_scsi_read(conn, task); case SPDK_SCSI_DIR_TO_DEV: - return iscsi_op_scsi_write(conn, task); + return iscsi_pdu_payload_op_scsi_write(conn, task); case SPDK_SCSI_DIR_NONE: iscsi_queue_task(conn, task); return 0; @@ -3965,7 +3965,7 @@ iscsi_pdu_hdr_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu } static int -iscsi_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) +iscsi_pdu_payload_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { struct spdk_iscsi_pdu *rsp_pdu; struct iscsi_bhs_nop_out *reqh; @@ -4479,7 +4479,7 @@ reject_return: } static int -iscsi_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) +iscsi_pdu_payload_op_data(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { struct spdk_iscsi_task *task, *subtask; struct iscsi_bhs_data_out *reqh; @@ -4748,23 +4748,23 @@ iscsi_pdu_payload_handle(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd switch (opcode) { case ISCSI_OP_LOGIN: - rc = iscsi_op_login(conn, pdu); + rc = iscsi_pdu_payload_op_login(conn, pdu); break; case ISCSI_OP_NOPOUT: - rc = iscsi_op_nopout(conn, pdu); + rc = iscsi_pdu_payload_op_nopout(conn, pdu); break; case ISCSI_OP_SCSI: - rc = iscsi_op_scsi(conn, pdu); + rc = iscsi_pdu_payload_op_scsi(conn, pdu); break; case ISCSI_OP_TASK: break; case ISCSI_OP_TEXT: - rc = iscsi_op_text(conn, pdu); + rc = iscsi_pdu_payload_op_text(conn, pdu); break; case ISCSI_OP_LOGOUT: break; case ISCSI_OP_SCSI_DATAOUT: - rc = iscsi_op_data(conn, pdu); + rc = iscsi_pdu_payload_op_data(conn, pdu); break; case ISCSI_OP_SNACK: break;