sg_alloc_table_chained(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is sg_alloc_table_chained(9) from the Kernel API Manual, and it's literally the page for β€œAllocate and chain SGLs in an sg table” πŸ’…βœ¨ That's the whole vibe: allocate, chain, slay.


✨ SYNOPSIS ✨

the signature is right here, bestie β€” copy it exactly, no editorializing:

int sg_alloc_table_chained (struct sg_table *table , int nents , struct
       scatterlist *first_chunk , unsigned nents_first_chunk );

πŸŽ€ ARGUMENTS πŸŽ€

  • table β€” the sg table header to use. that's your main-character struct, fr fr 🫢
  • nents β€” number of entries in the sg list. yes bestie, count them πŸ’–
  • first_chunk β€” the first SGL. like, the first one first 🌟
  • nents_first_chunk β€” number of the SGL of first_chunk. okay so it's the count for that first chunk, got it πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function allocates and chains SGLs in an sg table ✨ If nents is larger than nents_first_chunk, a chained sg table will be setup. that's the tea β˜•

also important: first_chunk is ignored if nents_first_chunk <= 1, because user expects the SGL points non-chain SGL 🫑 no cap, that's the rule.


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./lib/sg_pool.c πŸ‘€
  • sg_free_table_chained(9) β€” the friend in the same little kernel-file friend group πŸ’œ

mwah πŸ’‹ cute little sign-off: this page came from source/version ./lib, dated October 2026, and it's the sg_alloc_table_chained(9) page. periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from