lpfc_els_free_iocb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lpfc_els_free_iocb β€” ok bestie, let's talk about the Linux kernel API manual page ✨

Hi hi! Today's main character is lpfc_els_free_iocb, and yes, we're reading the kernel API manual together, it's giving study date energy πŸŽ€


✨ NAME ✨

lpfc_els_free_iocb β€” free a command iocb and its associated resources πŸ’–

🌸 SYNOPSIS 🌸

int lpfc_els_free_iocb (struct lpfc_hba *phba , struct lpfc_iocbq
*elsiocb );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • phba β€” pointer to lpfc hba data structure. literally your hba's whole personality lives in there πŸ’«
  • elsiocb β€” pointer to lpfc els command iocb data structure. this is the actual iocb we're about to send to the shadow realm 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the vibe: this routine frees a command IOCB and its associated resources. Periodt.

The command IOCB data structure is holding references to a bunch of associated resources, and here's the part you cannot skip, bestie β€” these fields must be set to NULL if the associated reference is not present:

  • cmd_dmabuf β€” reference to cmd.
  • cmd_dmabuf->next β€” reference to rsp.
  • rsp_dmabuf β€” unused.
  • bpl_dmabuf β€” reference to bpl.
Not me stressing how those fields get set to NULL when the reference isn't there β€” that's the whole safety check, don't sleep on it πŸ™ˆ

Here's the order of operations, and yes it matters, okay, the sequence is iconic:

  1. First it properly decrements the reference count held on ndlp for the IOCB completion callback function.
  2. If the LPFC_DELAY_MEM_FREE flag is not set, it invokes the lpfc_els_free_data routine to release the Direct Memory Access (DMA) buffers associated with the IOCB.
  3. Otherwise (so, if that flag is set, iykyk), it adds the DMA buffer to the phba data structure for the delayed release.
  4. If a reference to the Buffer Pointer List (BPL) is present, the lpfc_els_free_bpl routine is invoked to release the DMA memory associated with BPL.
  5. Finally, the lpfc_sli_release_iocbq routine is invoked to release the IOCB data structure back to the phba IOCBQ list. slay, closure πŸ’…

Return code 0 - Success (currently, always return 0) β€” yes bestie, that's the whole return value situation, it's always 0 for now, no cap πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/scsi/lpfc/lpfc_els.c β€” and honestly the friend group in there is HUGE, so here is the whole crew, every single one of them, no one left behind 🫢

lpfc_els_chk_latt(9), lpfc_prep_els_iocb(9), lpfc_issue_fabric_reglogin(9),
lpfc_issue_reg_vfi(9), lpfc_issue_unreg_vfi(9),
lpfc_check_clean_addr_bit(9), lpfc_cmpl_els_flogi_fabric(9),
lpfc_cmpl_els_flogi_nport(9), lpfc_cmpl_els_flogi(9),
lpfc_cmpl_els_link_down(9), lpfc_issue_els_flogi(9),
lpfc_els_abort_flogi(9), lpfc_initial_flogi(9), lpfc_initial_fdisc(9),
lpfc_more_plogi(9), lpfc_plogi_confirm_nport(9), lpfc_end_rscn(9),
lpfc_cmpl_els_rrq(9), lpfc_check_encryption(9), lpfc_cmpl_els_plogi(9),
lpfc_issue_els_plogi(9), lpfc_cmpl_els_prli(9), lpfc_issue_els_prli(9),
lpfc_rscn_disc(9), lpfc_adisc_done(9), lpfc_more_adisc(9),
lpfc_cmpl_els_adisc(9), lpfc_issue_els_adisc(9), lpfc_cmpl_els_logo(9),
lpfc_issue_els_logo(9), lpfc_cmpl_els_cmd(9), lpfc_reg_fab_ctrl_node(9),
lpfc_cmpl_els_disc_cmd(9), lpfc_issue_els_scr(9),
lpfc_issue_els_rscn(9), lpfc_issue_els_farpr(9), lpfc_issue_els_rdf(9),
lpfc_least_capable_settings(9), lpfc_cmpl_els_edc(9),
lpfc_cancel_retry_delay_tmo(9), lpfc_els_retry_delay(9),
lpfc_els_retry_delay_handler(9), lpfc_link_reset(9), lpfc_els_retry(9),
lpfc_els_free_data(9), lpfc_els_free_bpl(9), lpfc_cmpl_els_logo_acc(9),
lpfc_mbx_cmpl_dflt_rpi(9), lpfc_cmpl_els_rsp(9), lpfc_els_rsp_acc(9),
lpfc_els_rsp_reject(9), lpfc_els_rsp_adisc_acc(9),
lpfc_els_rsp_prli_acc(9), lpfc_els_rsp_rnid_acc(9),
lpfc_els_clear_rrq(9), lpfc_els_rsp_echo_acc(9), lpfc_els_disc_adisc(9),
lpfc_els_disc_plogi(9), lpfc_els_rcv_lcb(9), lpfc_els_flush_rscn(9),
lpfc_rscn_payload_check(9), lpfc_rscn_recovery_check(9),
lpfc_send_rscn_event(9), lpfc_els_rcv_rscn(9), lpfc_els_handle_rscn(9),
lpfc_els_rcv_flogi(9), lpfc_els_rcv_rnid(9), lpfc_els_rcv_echo(9),
lpfc_els_rcv_lirr(9), lpfc_els_rcv_rrq(9), lpfc_els_rsp_rls_acc(9),
lpfc_els_rcv_rls(9), lpfc_els_rcv_rtv(9), lpfc_send_rrq(9),
lpfc_els_rsp_rpl_acc(9), lpfc_els_rcv_rpl(9), lpfc_els_rcv_farp(9),
lpfc_els_rcv_farpr(9), lpfc_els_rcv_fan(9), lpfc_els_rcv_edc(9),
lpfc_els_timeout(9), lpfc_els_timeout_handler(9), lpfc_els_flush_cmd(9),
lpfc_els_flush_all_cmd(9), lpfc_send_els_failure_event(9),
lpfc_send_els_event(9), lpfc_display_fpin_wwpn(9),
lpfc_els_rcv_fpin_li(9), lpfc_els_rcv_fpin_del(9),
lpfc_els_rcv_fpin_peer_cgn(9), lpfc_els_rcv_fpin_cgn(9),
lpfc_els_unsol_buffer(9), lpfc_els_unsol_event(9),
lpfc_do_scr_ns_plogi(9), lpfc_cmpl_reg_new_vport(9),
lpfc_register_new_vport(9), lpfc_cancel_all_vport_retry_delay_timer(9),
lpfc_retry_pport_discovery(9), lpfc_fabric_login_reqd(9),
lpfc_cmpl_els_fdisc(9), lpfc_issue_els_fdisc(9),
lpfc_cmpl_els_npiv_logo(9), lpfc_issue_els_npiv_logo(9),
lpfc_fabric_block_timeout(9), lpfc_resume_fabric_iocbs(9),
lpfc_unblock_fabric_iocbs(9), lpfc_block_fabric_iocbs(9),
lpfc_cmpl_fabric_iocb(9), lpfc_issue_fabric_iocb(9),
lpfc_fabric_abort_vport(9), lpfc_fabric_abort_nport(9),
lpfc_fabric_abort_hba(9), lpfc_sli4_vport_delete_els_xri_aborted(9),
lpfc_sli4_els_xri_aborted(9)

And that's the whole page, bestie β€” sourced straight out of ./drivers/scsi/lpfc, dated October 2026, and yes the header and footer both say lpfc_els_free_iocb(9) because consistency is the moment πŸ’– Go free those IOCBs, you're gonna do amazing 🌈⭐

πŸ“¦ where this page comes from