iscsi_session_setup(9)
π iscsi_session_setup(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to iscsi_session_setup(9) π this is one of those kernel API manual pages, and honestly? it's giving "quietly holds everything together" main character energy π let's get into it.
β¨ NAME β¨
iscsi_session_setup β create iscsi cls session and host and session π¦
like yes, all three of those things. it's an overachiever, we love that for it π
πΈ SYNOPSIS πΈ
struct iscsi_cls_session * iscsi_session_setup (struct iscsi_transport
*iscsit , struct Scsi_Host *shost , uint16_t cmds_max , int dd_size ,
int cmd_task_size , uint32_t initial_cmdsn , unsigned int id );
seven whole arguments, no cap π it's thorough and i respect it.
π ARGUMENTS π
iscsitβ the iscsi transport template π think of it as the blueprint vibeshostβ the scsi host, the home base for all this πcmds_maxβ how many commands the session can queue π₯dd_sizeβ private driver data size, and it gets added to the session allocation size π§cmd_task_sizeβ LLD task private data size πinitial_cmdsnβ the initial CmdSN βidβ target ID to add to this session π
π¦ DESCRIPTION π¦
so here's the tea β β this one can be used by software iscsi_transports that allocate a session per scsi host. periodt.
and listen, callers should set cmds_max to the largest total number (mgmt + scsi) of tasks they support π because the iscsi layer reserves ISCSI_MGMT_CMDS_MAX tasks for nop handling and login/logout requests. so yeah, don't lowkey forget those, fr fr π
bestie please actually set cmds_max to the largest total (mgmt + scsi) number of tasks you support β those management tasks are already spoken for π
π« SEE ALSO π«
Kernel file ./drivers/scsi/libiscsi.c, plus this whole friend group right here π«Ά:
iscsi_prep_data_out_pdu(9)iscsi_check_tmf_restrictions(9)iscsi_prep_scsi_cmd_pdu(9)iscsi_free_task(9)__iscsi_put_task(9)iscsi_complete_task(9)iscsi_complete_scsi_task(9)iscsi_alloc_mgmt_task(9)iscsi_send_mgmt_task(9)iscsi_scsi_cmd_rsp(9)iscsi_data_in_rsp(9)iscsi_nop_out_rsp(9)iscsi_itt_to_task(9)__iscsi_complete_pdu(9)iscsi_itt_to_ctask(9)iscsi_requeue_task(9)iscsi_data_xmit(9)iscsi_suspend_queue(9)iscsi_suspend_tx(9)iscsi_suspend_rx(9)iscsi_conn_unbind(9)iscsi_eh_session_reset(9)iscsi_eh_target_reset(9)iscsi_eh_recover_target(9)iscsi_host_add(9)iscsi_host_alloc(9)iscsi_host_remove(9)iscsi_session_free(9)iscsi_session_teardown(9)iscsi_conn_setup(9)iscsi_conn_teardown(9)
like, the whole squad shows up π obsessed.
mwah π that's the whole page β brought to you by ./drivers/scsi, dated October 2026, in iscsi_session_setup(9). slay, go build something iconic β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms