lpfc_prep_els_iocb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lpfc_prep_els_iocb(9) πŸ’…

okay bestie, welcome to the Kernel API Manual corner β€” this page is literally about allocating and prepping a lpfc iocb data structure, and it’s giving main-character kernel energy πŸ‘‘

✨ NAME ✨

lpfc_prep_els_iocb β€” allocate and prepare a lpfc iocb data structure. no cap, that’s the whole vibe πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

struct lpfc_iocbq * lpfc_prep_els_iocb (struct lpfc_vport *vport , u8
expect_rsp , u16 cmd_size , u8 retry , struct lpfc_nodelist *ndlp , u32
did , u32 elscmd );

πŸŽ€ ARGUMENTS πŸŽ€

  • vport β€” pointer to a host virtual N_Port data structure.
  • expect_rsp β€” flag indicating whether response is expected.
  • cmd_size β€” size of the ELS command.
  • retry β€” number of retries to the command when it fails.
  • ndlp β€” pointer to a node-list data structure.
  • did β€” destination identifier.
  • elscmd β€” the ELS command code.

🌸 DESCRIPTION 🌸

okay so here’s the lore: this routine allocates a lpfc-IOCB data structure from the driver lpfc-IOCB free-list, then preps that IOCB with the parameters passed into the routine so the discovery state machine can issue Extended Link Service (ELS) commands. it’s the generic lpfc-IOCB allocation-and-preparation routine used by all the discovery state machine routines β€” the ELS command-specific fields get set up later by the individual discovery machine routines after they call this routine to allocate and prepare a generic IOCB data structure. bestie, it’s the prepper, not the whole personality πŸ’…

it fills in the Buffer Descriptor Entries (BDEs), and allocates buffers for both the command payload and the response payload (if expected). also β€” and this part matters β€” the reference count on the ndlp is incremented by 1, and the reference to the ndlp is put into ndlp of the IOCB data structure for this IOCB to hold the ndlp reference for the command’s callback function to access later. iconic reference-holding behavior, honestly 🫢

Return code:

  • Pointer to the newly allocated/prepared els iocb data structure
  • NULL - when els iocb data structure allocation/preparation failed

🌈 SEE ALSO 🌈

Kernel file ./drivers/scsi/lpfc/lpfc_els.c β€” and here’s the whole friend group, bestie:


πŸŽ€ and that’s the whole page, bestie: source/version ./drivers/scsi/lpfc, date October 2026, manual page lpfc_prep_els_iocb(9). periodt. πŸ’–

πŸ“¦ where this page comes from