bnx2i_ep_connect(9)
π bnx2i_ep_connect β like, the whole kernel API manual moment β¨
okay so bestie, welcome to bnx2i_ep_connect(9) from the Kernel API Manual β yes that manual, the one that lives in ./drivers/scsi/bnx2i β and honestly? this little function is lowkey the main character of getting an iSCSI connection off the ground. let's get into it π«Ά
πΈ NAME πΈ
bnx2i_ep_connect β literally just: establish a TCP connection to the target portal. that's the whole vibe. π
β¨ SYNOPSIS β¨
struct iscsi_endpoint * bnx2i_ep_connect (struct Scsi_Host *shost ,
struct sockaddr *dst_addr , int non_blocking );
it returns a struct iscsi_endpoint *, periodt. π
π¦ ARGUMENTS π¦
shostβ the scsi host, aka the whole scene this is happening in πdst_addrβ the target IP address, like the address of the portal we're sliding into πΊοΈnon_blockingβ blocking or non-blocking call, iykyk β you pick whether this thing waits around or not π
π₯ DESCRIPTION π₯
okay so this routine initiates the TCP/IP connection by invoking the Option-2 i/f with l5_core and the CNIC. no cap, that's the move. β
and it's not one of those one-and-done situations β this is a multi-step process, bestie, a whole journey:
- resolving the route to the target π§
- create a iscsi connection context π§΅
- handshaking with the CNIC module to create/initialize the socket struct π€
- finally sending down the option-2 request to complete the TCP 3-way handshake π₯
it's giving full pipeline energy and honestly it ate. π
ngl, there's no error list, no return value breakdown, no environment variables here β this is a short-and-sweet manpage and we respect it. π
π SEE ALSO π
the kernel file lives right here, bestie β go read it:
Kernel file ./drivers/scsi/bnx2i/bnx2i_iscsi.c
and the whole β¨friend groupβ¨ of related calls:
bnx2i_get_write_cmd_bd_idx(9),bnx2i_setup_write_cmd_bd_info(9),bnx2i_map_scsi_sg(9),bnx2i_iscsi_map_sg_list(9),bnx2i_iscsi_unmap_sg_list(9),bnx2i_bind_conn_to_iscsi_cid(9),bnx2i_get_conn_from_id(9),bnx2i_alloc_iscsi_cid(9),bnx2i_free_iscsi_cid(9),bnx2i_setup_free_cid_que(9),bnx2i_release_free_cid_que(9),bnx2i_alloc_ep(9),bnx2i_free_ep(9),bnx2i_alloc_bdt(9),bnx2i_destroy_cmd_pool(9),bnx2i_setup_cmd_pool(9),bnx2i_setup_mp_bdt(9),bnx2i_free_mp_bdt(9),bnx2i_drop_session(9),bnx2i_ep_destroy_list_add(9),bnx2i_ep_destroy_list_del(9),bnx2i_ep_ofld_list_add(9),bnx2i_ep_ofld_list_del(9),bnx2i_find_ep_in_ofld_list(9),bnx2i_find_ep_in_destroy_list(9),bnx2i_ep_active_list_add(9),bnx2i_ep_active_list_del(9),bnx2i_setup_host_queue_size(9),bnx2i_alloc_hba(9),bnx2i_free_hba(9),bnx2i_conn_free_login_resources(9),bnx2i_conn_alloc_login_resources(9),bnx2i_iscsi_prep_generic_pdu_bd(9),bnx2i_iscsi_send_generic_request(9),bnx2i_cpy_scsi_cdb(9),bnx2i_mtask_xmit(9),bnx2i_task_xmit(9),bnx2i_session_create(9),bnx2i_session_destroy(9),bnx2i_conn_create(9),bnx2i_conn_bind(9),bnx2i_conn_destroy(9),bnx2i_ep_get_param(9),bnx2i_host_get_param(9),bnx2i_conn_start(9),bnx2i_conn_get_stats(9),bnx2i_check_route(9),bnx2i_tear_down_conn(9),bnx2i_ep_poll(9),bnx2i_ep_tcp_conn_active(9),bnx2i_hw_ep_disconnect(9),bnx2i_ep_disconnect(9),bnx2i_nl_set_path(9)
like, that's the entire group chat and every single one of them is invited. π§π
okay that's the page!! mwah π this one came from ./drivers/scsi/bnx2i and it's dated October 2026 β so like, future-flavored lore, we love to see it. stay slay, go connect some TCP, and remember: resolve route β create connection context β handshake with CNIC β complete that 3-way handshake. iconic behavior only. π¦πΈπ
π¦ 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