STRUCT SDMA_MAP_ELEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct sdma_map_elem(9) πŸ¦‹

okay so we're in the Kernel API Manual bestie, and this page is about struct sdma_map_elem β€” literally the mapping situation for a vl, with a @mask selector mask and a @sde array of engines for this vl. periodt. πŸ’…


✨ NAME ✨

struct sdma_map_elem β€” the mapping for a vl. Real talk: @mask is the selector mask and @sde is the array of engines for this vl. that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

struct sdma_map_elem {
    u32 mask;
    struct sdma_engine *sde[];
 };

two members, zero drama. the sde[] is a trailing array, which β€” iykyk β€” means it's flexible and it lives at the end. πŸ‘‘


🫢 Members 🫢

okay so genuine moment: this heading is just... here. the original page leaves it empty and drops straight into Description. no members listed, no bullets, nothing. not me pointing it out but also yes me pointing it out πŸ™ˆ (the actual member info lives down in Description, keep reading bestie πŸ’–)


πŸ”₯ Description πŸ”₯

so here's the tea: the mask is used to "mod" the selector to produce an index into the trailing array of sdes. that's it, that's the mechanic. you take your selector, you mod it by the mask, and boom β€” you've got your index into the array at the end. slay. ✨

literally the whole struct is just: mask does the math, trailing array does the holding. iconic division of labour. 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

go read all of them, bestie, that's your homework 🌈


πŸ’€ friendly reminder: everything above came straight from the page, so don't go inventing behaviour that isn't in it, fr fr.

and that's a wrap! πŸŽ€ this little gem lives at ./drivers/infiniband/hw/hfi1 and the version stamped on it is October 2026. go off, read the source, drink some water. mwah πŸ’œβœ¨

πŸ“¦ where this page comes from