mpi3mr_total_num_ioctl_sges(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mpi3mr_total_num_ioctl_sges(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual (section 9, kernel developer land, not your "how do I use ls" zone ✨) and it's all about mpi3mr_total_num_ioctl_sges. yes that's a mouthful, we love her anyway 🫢


✨ NAME ✨

mpi3mr_total_num_ioctl_sges β€” literally just counts how many SGEs you need πŸ’… no cap, that's the whole job.


🌸 SYNOPSIS 🌸

u16 mpi3mr_total_num_ioctl_sges (struct mpi3mr_buf_map *drv_bufs , u8
bufcnt );

that's the signature, copy it exactly, do not freestyle it πŸ™ˆ she returns a u16, she takes two args, that's the vibe.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • drv_bufs β€” the DMA address of the buffers that are gonna get placed in the sgl. like, the actual spot in memory where your buffer descriptors live 🧚
  • bufcnt β€” how many DMA buffers you're working with. the count. the number. u8 sized so don't go feral with it ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜• β€” this function returns the total number of data SGEs required for the list of data buffer descriptors you hand it.

and the details matter, bestie, so let's be precise:

  • it includes zero length SGEs βœ…
  • it excludes the management request and response buffer ❌

that's it. that's the whole function. she's a counter, she's iconic, she minds her business πŸ’–

lowkey the important bit is that "includes zero length SGEs" and "excludes the management request and response buffer" β€” if you get those two backwards your sgl math is gonna be a whole mess 😭

πŸ”₯ RETURN πŸ”₯

returns the number of SGE elements needed β€” as a u16, so plan accordingly 🌈


πŸŽ€ SEE ALSO πŸŽ€

the kernel file where all this lives:

Kernel file ./drivers/scsi/mpi3mr/mpi3mr_app.c

and the whole extended friend group (yes, all of them, don't skip, we support the whole cast πŸ’œ):


and that's the page!! πŸ’« quick sign-off so nobody comes for me: this one lives under ./drivers/scsi/mpi3mr and the date on it is October 2026 β€” go read the source, it's giving main character energy, periodt πŸ‘‘πŸ¦‹πŸ’–

πŸ“¦ where this page comes from