calc_tx_flits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… calc_tx_flits β€” like, the whole vibe check ✨

okay so bestie, welcome to the Kernel API Manual entry for calc_tx_flits(9) and yes we are doing this, pull up a chair πŸŽ€


🌸 NAME 🌸

calc_tx_flits β€” bestie it literally calculates the number of flits for a packet TX WR, that's the whole job, that's the assignment, no notes πŸ’…


✨ SYNOPSIS ✨

unsigned int calc_tx_flits (const struct sk_buff *skb );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the packet 🫢 like, the actual Ethernet packet we're talking about here, that one

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: this function returns the number of flits needed for a TX Work Request for the Ethernet packet you handed it.

and not just the flits for the packet itself, no ma'am β€” it also counts the WR and CPL headers you need. inclusive queen behavior πŸ‘‘ so it's the packet plus the WR and CPL headers, all bundled into one number, and it hands that number back to you as an unsigned int πŸ”₯


🌈 SEE ALSO 🌈

okay so this function has, like, so many friends, it's giving main character with a whole group chat 😭 here's the full squad:

Kernel file ./drivers/net/ethernet/chelsio/cxgb4vf/sge.c

and then, alphabetically unhinged but we respect it:

get_buf_addr(9), is_buf_mapped(9), need_skb_unmap(9), txq_avail(9), fl_cap(9), fl_starving(9), map_skb(9), free_tx_desc(9), reclaim_completed_tx(9), get_buf_size(9), free_rx_bufs(9), unmap_rx_buf(9), ring_fl_db(9), set_rx_sw_desc(9), refill_fl(9), alloc_ring(9), sgl_len(9), flits_to_desc(9), is_eth_imm(9), write_sgl(9), ring_tx_db(9), inline_tx_skb(9), t4vf_eth_xmit(9), copy_frags(9), t4vf_pktgl_to_skb(9), t4vf_pktgl_free(9), do_gro(9), t4vf_ethrx_handler(9), is_new_response(9), restore_rx_bufs(9), rspq_next(9), process_responses(9), napi_rx_handler(9), t4vf_intr_handler(9), sge_rx_timer_cb(9), sge_tx_timer_cb(9), bar2_address(9), t4vf_sge_alloc_rxq(9), t4vf_sge_alloc_eth_txq(9), t4vf_free_sge_resources(9), t4vf_sge_start(9), t4vf_sge_stop(9), t4vf_sge_init(9)

like, go read them, they're iconic, they're all in the cxgb4vf sge.c cinematic universe πŸ“


ngl there's no EXAMPLES section in this one, no BUGS, no RETURN VALUE section either β€” the number comes back as unsigned int and that's just how it is, periodt. don't come for me, I don't make the manpage rules πŸ’€

and that's the page babes 🧚 this little love letter to calc_tx_flits(9) comes from ./drivers/net/ethernet/chelsio... (yeah the path is literally abbreviated with ... in the original, I don't make the rules, I just report them πŸ™ˆ) and it's dated October 2026. stay hydrated, count your flits, and remember the headers πŸ’œβœ¨

πŸ“¦ where this page comes from