__lpfc_mbuf_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __lpfc_mbuf_free β€” NAME ✨

Okay so bestie, welcome to the Kernel API Manual πŸ’– β€” this one's about __lpfc_mbuf_free, which is literally the function that frees an mbuf from the lpfc_mbuf_pool PCI pool (and yes, it's the locked one, iykyk πŸ”’).


🌸 SYNOPSIS 🌸

void __lpfc_mbuf_free (struct lpfc_hba * phba , void *virt , dma_addr_t dma );

πŸŽ€ ARGUMENTS πŸŽ€

  • phba β€” the HBA that owns the pool we're returning stuff to, like it's the one holding the receipts 🧾
  • virt β€” the mbuf you wanna free, the actual star of the show ⭐
  • dma β€” the DMA-mapped address of the lpfc_mbuf_pool that's getting freed πŸ¦‹

πŸ”₯ DESCRIPTION πŸ”₯

So here's the vibe check: this function takes an mbuf from lpfc_mbuf_pool and returns it to the lpfc_mbuf_safety_pool β€” but only if it's below its max_count πŸ’…. If it's not below max_count? Then it just frees the mbuf instead, periodt. Two paths, one function, no cap. πŸ‘‘


🫢 NOTES 🫢

Bestie. Listen. πŸ‘€ This must be called with phba->hbalock held, so that access to lpfc_mbuf_safety_pool is synchronized. Do not skip this, fr fr β€” the lock is the whole point. 😭

πŸ’€ RETURN πŸ’€

None. That's it. Nothing comes back. It's giving "I did my job and left" energy πŸ™ˆ.


🌈 SEE ALSO 🌈

Kernel file ./drivers/scsi/lpfc/lpfc_mem.c ✨ plus the whole friend group:


And that's the whole page, bestie β€” mwah πŸ’‹ This cutie lives in ./drivers/scsi/lpfc, dated October 2026, and it's filed under __lpfc_mbuf_free(9) in case you ever need to find it again πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from