Hi all, I have been tracing the initiator code (ver 2.0.871) and trying to understand:
How does user-land code talk to the kernel-land code about the parameter settings, if they are not using the default value? Say, a larger "node.conn[0].iscsi.MaxRecvDataSegmentLength"? As I trace the code, I think I have found how login happens and how connections are established, but I just couldn't find the answer to the above question... Could anyone help me a bit about that, say a bit explanation or pointing me to some part of the code? Thanks a lot! Jack And the following is what I have found so far about the login and connection establishment. ******* function call trace for login ******* iscsiadm main() exec_node_op() login_portals() __login_portals() (use a function pointer) login_portal() iscsid_req_by_rec_async() / iscsid_req_by_rec() iscsid_request() // The direct function call chain ends here. // the connection creation requst is now trasfered to the other end // of the socket by IPC // the code on the other hand will take over the connection establishment task IPC mechanism for user land main() in iscsid.c calls mgmt_ipc_listen(void) mgmt_ipc_listen(void) // creates and listens to the IPC socket, this is the other end of the socket that was used in iscsid_connect mgmt_ipc_listen(void) returns to main() the fd of the local socket main() in iscsid.c uses the returned fd in event_loop() event_loop() calls mgmt_ipc_handle with that fd (mgmt_ipc_fd) mgmt_ipc_handle assign handler, a function pointer, an appropriate function according to the command sent from the other end of the local socket and user handler to handle it in case of login, the function will be mgmt_ipc_session_login() mgmt_ipc_session_login() then calls session_login_task() session_login_task() does a series of session initiation and then calls iscsi_conn_connect() session_login_task() then use a function pointer, ep_connect, in the struct iscsi_conn (conn->session->t->template->ep_connect(conn, 1)), which is initialized by struct iscsi_transport_template iscsi_tcp = { .name = "tcp", // this is the connection function used in iscsi_conn_connect, // which is a function in initiator.c and can be traced from // mgmt_ipc_session_login, a function in mgmt_ipc.c .ep_connect = iscsi_io_tcp_connect, .... }; so in case if iscsi_tcp, the function called by ep_connect is iscsi_io_tcp_connect. iscsi_io_tcp_connect then finally establishes the connection. ******* ends here ******* -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to open-is...@googlegroups.com. To unsubscribe from this group, send email to open-iscsi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.