free_rx_bufs(9)
π free_rx_bufs(9) β the Kernel API Manual, bestie edition π
okay so we're in the Kernel API Manual today and the page is literally called free_rx_bufs(9), and yes it's exactly what it sounds like: it frees RX buffers on an SGE Free List. slay. let's get into it π¦
β¨ NAME β¨
free_rx_bufs β free RX buffers on an SGE Free List π
πΈ SYNOPSIS πΈ
void free_rx_bufs (struct adapter *adapter , struct sge_fl *fl , int n
);
that's the whole vibe. three args, one void, no notes. π
π§ ARGUMENTS π§
adapterβ the adapter. that's it, that's the whole description, she's the main character and needs no further introduction πflβ the SGE Free List to free buffers from π«Άnβ how many buffers to free. a number. a count. the amount. π₯
π DESCRIPTION π
so what it does: it releases the next n buffers on an SGE Free List RX queue. that's the whole thing, no cap.
β οΈ but listen to me, bestie, this part is NOT a joke: the buffers must be made inaccessible to hardware before calling this function. like, hardware can't still be touching them. do the un-mapping first, then call this. not the other way around. i'm so serious ππ
π SEE ALSO π
the kernel file this lives in, for when you need to go to the source (literally):
- Kernel file
./drivers/net/ethernet/chelsio/cxgb4vf/sge.c
and the whole friend group, in the order the page gives them (don't come for me, i'm not sorting them):
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)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!! πβ¨ this lil gem comes to you from ./drivers/net/ethernet/chelsio... and it's dated October 2026 β so yeah, from the future, she's ahead of her time, we love that for her. bye bestie, go unmap those buffers first ππ¦π
π¦ 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