ice_alloc_rx_bufs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_alloc_rx_bufs(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this one's a lil function from the ice driver and it's literally all about swapping out used-up receive buffers, no cap 🫢


🌸 NAME 🌸

ice_alloc_rx_bufs β€” replace used receive buffers πŸ’…


✨ SYNOPSIS ✨

bool ice_alloc_rx_bufs (struct ice_rx_ring *rx_ring , unsigned int
cleaned_count );

πŸŽ€ ARGUMENTS πŸŽ€

  • rx_ring β€” the ring where we're placing the buffers, bestie πŸ¦‹
  • cleaned_count β€” how many buffers we're replacing ✨

πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe check πŸ‘‘: this returns false if all the allocations were successful, and true if any of them fail. Returning true is basically the function being like "hey, I did not replace cleaned_count buffers, there's still more work to do" β€” so it's signaling to the caller that we're not done 🫢

First, it tries to clean "cleaned_count" Rx buffers. Then it refills the cleaned Rx buffers. Then it bumps tail at most one time. Grouping it like this is the whole slay β€” it lets us avoid multiple tail writes per call πŸ”₯ periodt.


🌈 SEE ALSO 🌈

Kernel file ./drivers/net/ethernet/intel/ice/ice_txrx.c πŸ’–

ice_prgm_fdir_fltr(9), ice_unmap_and_free_tx_buf(9), ice_clean_tstamp_ring(9), ice_free_tstamp_ring(9), ice_free_tx_tstamp_ring(9), ice_clean_tx_ring(9), ice_free_tx_ring(9), ice_clean_tx_irq(9), ice_alloc_tstamp_ring(9), ice_setup_tstamp_ring(9), ice_alloc_setup_tstamp_ring(9), ice_setup_tx_ring(9), ice_clean_rx_ring(9), ice_free_rx_ring(9), ice_setup_rx_ring(9), ice_run_xdp(9), ice_xmit_xdp_ring(9), ice_xdp_xmit(9), ice_init_ctrl_rx_descs(9), ice_clean_ctrl_rx_irq(9), ice_clean_rx_irq(9), ice_net_dim(9), ice_buildreg_itr(9), ice_enable_interrupt(9), ice_set_wb_on_itr(9), ice_napi_poll(9), __ice_maybe_stop_tx(9), ice_maybe_stop_tx(9), ice_tx_map(9), ice_tx_csum(9), ice_tx_prepare_vlan_flags(9), ice_tso(9), ice_txd_use_count(9), ice_xmit_desc_count(9), __ice_chk_linearize(9), ice_chk_linearize(9), ice_tstamp(9), ice_xmit_frame_ring(9), ice_start_xmit(9), ice_get_dscp_up(9), ice_clean_ctrl_tx_irq(9) πŸ’…


okay that's the whole thing, and before you go β€” this icon of a page lives in ./drivers/net/ethernet/intel/ice, dated October 2026, and yeah that's the sign-off, mwah πŸ’‹ go read some ice_clean_rx_irq(9) next, iykyk πŸ§šβ€β™€οΈπŸ“

πŸ“¦ where this page comes from