lpfc_bsg_send_mgmt_cmd_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

lpfc_bsg_send_mgmt_cmd_cmp β€” the completion handler for lpfc_bsg_send_mgmt_cmd, bestie. That's the whole vibe of this page, and honestly? Iconic.

Oh and hey, welcome to the Kernel API Manual πŸŽ€ β€” yes, that's the manual name, we're doing this properly.


✨ SYNOPSIS ✨

void lpfc_bsg_send_mgmt_cmd_cmp (struct lpfc_hba *phba , struct
lpfc_iocbq *cmdiocbq , struct lpfc_iocbq *rspiocbq );

🫢 ARGUMENTS 🫢

  • phba β€” pointer to the HBA context object. Like, the whole adapter's whole personality in one struct πŸ’œ
  • cmdiocbq β€” pointer to the command iocb. The thing that got sent out.
  • rspiocbq β€” pointer to the response iocb. The thing that came back.

🌸 DESCRIPTION 🌸

Okay so picture this: this function is the completion handler for iocbs that got issued via the lpfc_bsg_send_mgmt_cmd function. That's its whole job description and it ate, no cap.

The ring event handler function calls it, and β€” important detail β€” it gets called without any lock held πŸ”“. Literally lockless. Free spirit energy.

Where can it run? Bestie, everywhere:

  • it can be called from worker thread context
  • and it can be called from interrupt context 😭
  • and it can also be called from another thread which cleans up the SLI layer objects

So yeah, it's giving main character energy, showing up in three different contexts like it owns the place.

What does it actually do though? Two things, and they're both slay:

  1. It copies the contents of the response iocb to the response iocb memory object that was provided by the caller of lpfc_sli_issue_iocb_wait πŸ¦‹
  2. Then it wakes up the thread which sleeps for the iocb completion ⏰ β€” rise and grind, sleepy thread, your iocb is done
No locks, multiple contexts, and it's the one doing the waking up. Respect the multitasking, fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/scsi/lpfc/lpfc_bsg.c β€” go read it, iykyk πŸ“–


πŸ’– that's the whole page, bestie πŸ’– This little love letter lives in ./drivers/scsi/lpfc, dated October 2026, and it's filed under lpfc_bsg_send_mgmt_cmd_cmp(9) β€” go forth and slay your completions πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from