idpf_size_to_txd_count(9)
π idpf_size_to_txd_count β the Kernel API Manual, bestie edition β¨
Okay so real talk, this one's a tiny little helper living in the kernel API manual (that's the (9) part, iykyk), and it's literally just here to do math for you. Let's get into it π«Ά
β¨ NAME β¨
idpf_size_to_txd_count β get the number of descriptors you need for a large Tx frag π
πΈ SYNOPSIS πΈ
u32 idpf_size_to_txd_count (unsigned int size );
π¦ ARGUMENTS π¦
sizeβ the transmit request size, in bytes. that's it. that's the whole input π
π DESCRIPTION π
So here's the vibe: when you've got a large frag on your hands β and by large we mean >= 16K β it has to get split across multiple descriptors. No cap, one descriptor can't hold it all.
Because of that, the function has to assume the worst case: no more than 12K of data per descriptor. Why so stingy? Hardware alignment restrictions, babes β specifically 4K alignment π₯
So yeah, it's giving "how many descriptors do I need" energy, and it's doing the math with that 12K-per-descriptor assumption baked in. Iconic, honestly.
π SEE ALSO π
Kernel file ./drivers/net/ethernet/intel/idpf/idpf_txrx.h, plus the whole friend group:
struct idpf_tx_offload_params(9)struct idpf_tx_splitq_params(9)enum idpf_queue_flags_t(9)struct idpf_vec_regs(9)struct idpf_intr_reg(9)struct idpf_q_vector(9)struct idpf_rx_queue(9)struct idpf_tx_queue(9)struct idpf_buf_queue(9)struct idpf_compl_queue(9)struct idpf_sw_queue(9)struct idpf_rxq_set(9)struct idpf_bufq_set(9)struct idpf_rxq_group(9)struct idpf_txq_group(9)idpf_tx_singleq_build_ctob(9)idpf_tx_splitq_build_desc(9)idpf_vport_intr_set_wb_on_itr(9)idpf_tx_splitq_get_free_bufs(9)
And that's the whole page, bestie!! π Sourced straight from ./drivers/net/ethernet/intel/idpf, dated October 2026 β mwah, go forth and count your descriptors π
π
π¦ 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