提交 42bc3e57 编写于 作者: V Varun Prakash 提交者: Nicholas Bellinger

iscsi-target: add int (*iscsit_validate_params)()

Add int (*iscsit_validate_params)() to
struct iscsit_transport, iscsi-target
uses this callback for validating
conn operational parameters.

cxgbit.ko needs this callback to check
and update the value of
MAXXMITDATASEGMENTLENGTH.
Signed-off-by: NVarun Prakash <varun@chelsio.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 e8205cca
......@@ -1387,6 +1387,16 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
goto old_sess_out;
}
if (conn->conn_transport->iscsit_validate_params) {
ret = conn->conn_transport->iscsit_validate_params(conn);
if (ret < 0) {
if (zero_tsih)
goto new_sess_out;
else
goto old_sess_out;
}
}
ret = iscsi_target_start_negotiation(login, conn);
if (ret < 0)
goto new_sess_out;
......
......@@ -26,6 +26,7 @@ struct iscsit_transport {
struct iscsi_datain_req *, const void *, u32);
void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *);
void (*iscsit_get_rx_pdu)(struct iscsi_conn *);
int (*iscsit_validate_params)(struct iscsi_conn *);
enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册