lpfc_cmpl_els_flogi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lpfc_cmpl_els_flogi(9) πŸ’…

okay so this is a page from the Kernel API Manual bestie, and today's main character is lpfc_cmpl_els_flogi. yes it's a mouthful. yes it slays. let's get into it πŸ¦‹


✨ NAME ✨

lpfc_cmpl_els_flogi β€” the completion callback function for flogi, no cap πŸŽ€


✨ SYNOPSIS ✨

void lpfc_cmpl_els_flogi (struct lpfc_hba *phba , struct lpfc_iocbq
*cmdiocb , struct lpfc_iocbq *rspiocb );

✨ ARGUMENTS ✨

  • phba β€” pointer to the lpfc hba data structure. your hba bestie fr.
  • cmdiocb β€” pointer to the lpfc command iocb data structure. the command one πŸ’Œ
  • rspiocb β€” pointer to the lpfc response iocb data structure. the response one πŸ’Œ

✨ DESCRIPTION ✨

okay so picture this: this routine is the top-level completion callback function for issuing a Fabric Login (FLOGI) command. very main character energy honestly πŸ‘‘

so first thing, bestie β€” if the response IOCB reported an error, the lpfc_els_retry routine shall be invoked to retry the FLOGI. that's the move.

now if a retry has been made (either immediately, or, like, delayed β€” that's when lpfc_els_retry returns 1), the command IOCB will be released and the function returned. done and dusted πŸ’…

but if the retry attempt has been given up (possibly because it reached the maximum number of retries 😭), one additional decrement of the ndlp reference shall be invoked before going out, after releasing the command IOCB. and like β€” this will actually release the remote node. quick note though, so you're not confused: lpfc_els_free_iocb will also invoke one decrement of the ndlp reference count. two decrements, two different places, iykyk πŸ”₯

and if there's no error reported in the IOCB status? then the command Port ID field is used to determine whether this is a point-to-point topology or a fabric topology:

  • if the Port ID field is assigned β†’ it's a fabric topology ✨
  • otherwise β†’ it's a point-to-point topology πŸ¦‹

and then the routine lpfc_cmpl_els_flogi_fabric or lpfc_cmpl_els_flogi_nport shall be invoked accordingly, to handle the specific topology completion conditions. like, each one handles its own vibe. periodt.


✨ SEE ALSO ✨

kernel file ./drivers/scsi/lpfc/lpfc_els.c β€” and honestly the whole friend group showed up for this one:


and that's the whole page bestie, you ate that πŸ’– ok bye, this came from ./drivers/scsi/lpfc and it's dated October 2026 β€” mwah, see you in the next man page 🫢✨

πŸ“¦ where this page comes from