iwl_pcie_prep_tso(9)
π 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 π
- Kernel file
./drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c iwl_txq_free_tfd(9)iwl_pcie_get_sgt_tb_phys(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms