iwl_pcie_prep_tso(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iwl_pcie_prep_tso(9) β€” from the Kernel API Manual, bestie ✨

Okay so today we're doing iwl_pcie_prep_tso, straight out of the Kernel API Manual. It's a kernel function, it's got six arguments, and yes we're gonna get through all of them together. Buckle up πŸŽ€


🌸 NAME 🌸

iwl_pcie_prep_tso β€” literally just: Prepare TSO page and SKB for sending. That's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

struct sg_table * iwl_pcie_prep_tso (struct iwl_trans *trans , struct
sk_buff *skb , struct iwl_cmd_meta *cmd_meta , u8 **hdr , unsigned int
hdr_room , unsigned int offset );

Yup that's the signature, copy it exactly if you're calling it, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

Every single one, in order, because we do not skip:

  • trans β€” the transport private data. The main character of the transport world πŸ‘‘
  • skb β€” the SKB to map. This is the payload bestie, the thing we're actually shipping out πŸ“¦
  • cmd_meta β€” command meta to store the scatter list information for unmapping. Yes, unmapping is the whole point β€” remember this one, it comes back later 😭
  • hdr β€” output argument for TSO headers. It's an output argument so like… it's giving "I'll tell you later" energy ✨
  • hdr_room β€” requested length for TSO headers. Gotta reserve the space, periodt πŸŽ€
  • offset β€” offset into the data from which mapping should start. Not from the beginning, from here πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So what does it actually do? Simple:

Allocate space for a scatter gather list and TSO headers, then map the SKB using the scatter gather list. That's the whole job, and it ate, honestly πŸ’€βœ¨

And the important part β€” the part where you need to pay attention, bestie πŸ‘€ β€” the SKB is unmapped again when the page is free'ed again at the end of the operation. So it's like a whole little lifecycle moment. Map it, live your life, free the page, get unmapped. Iconic. 🌈

Lowkey important: the unmapping happens when the page is free'ed again at the end of the operation β€” so don't go freeing pages early and acting surprised 😭

πŸ’– RETURN πŸ’–

Returns the newly allocated and mapped scatter gather table with list. So you get a struct sg_table * back β€” freshly allocated, freshly mapped, ready to go 🫢


🌟 SEE ALSO 🌟

Go read those next, iykyk πŸ“š


Okay that's the whole page, bestie β€” go forth and map those SKBs πŸ’œ

Signed off with love from ./drivers/net/wireless/intel/i..., dated October 2026, and living in the iwl_pcie_prep_tso(9) era forever πŸŒΈπŸŽ€βœ¨

πŸ“¦ where this page comes from