lpfc_nvmet_prep_ls_wqe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– lpfc_nvmet_prep_ls_wqe(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this page is literally all about lpfc_nvmet_prep_ls_wqe(9), and it is giving β€œget that lpfc wqe data structure allocated and prepared” energy. slay. πŸ’…


🌸 NAME 🌸

lpfc_nvmet_prep_ls_wqe β€” allocate and prepare a lpfc wqe data structure. that’s the assignment, and it ate. ✨

✨ SYNOPSIS ✨

struct lpfc_iocbq * lpfc_nvmet_prep_ls_wqe (struct lpfc_hba *phba ,
       struct lpfc_async_xchg_ctx *ctxp , dma_addr_t rspbuf , uint16_t rspsize
       );

πŸŽ€ ARGUMENTS πŸŽ€

  • phba β€” pointer to a host N_Port data structure. host N_Port moment, no cap. 🫢
  • ctxp β€” context info for NVME LS Request. yes, the context bestie.
  • rspbuf β€” DMA buffer of NVME command. buffer vibes.
  • rspsize β€” size of the NVME command. literally the size.

πŸ’… DESCRIPTION πŸ’…

okay so here’s the vibe: this routine allocates a lpfc-WQE data structure from the driver lpfc-WQE free-list, then prepares the WQE with the parameters passed into the routine β€” all so the discovery state machine can issue Extended Link Service (NVME) commands. iconic behavior. 🌟

It’s a generic lpfc-WQE allocation and preparation routine that all the discovery state machine routines use. The NVME command-specific fields are not set here β€” they get set up later by the individual discovery machine routines after they call this routine to allocate and prepare a generic WQE data structure. periodt.

It fills in the Buffer Descriptor Entries (BDEs), and it allocates buffers for both command payload and response payload (if expected). πŸ“

The reference count on the ndlp is incremented by 1, and the reference to the ndlp is put into context1 of the WQE data structure. that’s so this WQE can hold the ndlp reference for the command’s callback function to access later. iykyk. πŸ”₯

Return code β€” pointer to the newly allocated/prepared nvme wqe data structure. and when it goes sideways: NULL β€” when nvme wqe data structure allocation/preparation failed. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/scsi/lpfc/lpfc_nvmet.c β€” go look, bestie. also these functions are in the group chat:

xoxo, from ./drivers/scsi/lpfc, dated October 2026, on the lpfc_nvmet_prep_ls_wqe(9) page πŸ’–

πŸ“¦ where this page comes from