reclaim_completed_tx(9)
πΈ reclaim_completed_tx(9) πΈ
okay bestie, welcome to the Kernel API Manual π this one's from the Linux kernel docs and it's lowkey a little function with a big job. let's get into it β¨
π NAME π
reclaim_completed_tx β the girlboss that reclaims completed TX descriptors π
π¦ SYNOPSIS π¦
void reclaim_completed_tx (struct adapter *adapter , struct sge_txq *tq
, bool unmap );
that's it. that's the whole signature. three args, no notes π
π ARGUMENTS π
adapterβ the adapter, obviously. the main character of the whole hardware situation πtqβ the TX queue we're pulling the completed descriptors out of π§unmapβ aboolthat tells us whether the buffers should be unmapped for DMA π₯
β DESCRIPTION β
so here's the tea β: this function reclaims TX descriptors that the SGE has indicated it has already processed, and it frees the associated buffers if possible π«Ά
β οΈ important caveat before you run off: it's called with the TX queue locked. that's not a suggestion, that's the whole vibe check. don't come for this function without holding the lock, fr fr π
π SEE ALSO π
the source lives at Kernel file ./drivers/net/ethernet/chelsio/cxgb4vf/sge.c β that's the address, bestie π
and now the whole friend group, in order, no skips, no cuts π«:
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)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)calc_tx_flits(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)
and that's the page, bestie π sign-off time: this was pulled from the source at ./drivers/net/ethernet/chelsio..., dated October 2026 β iconic, timeless, we love to see it πβ¨
π¦ 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