fl_cap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 fl_cap(9) β€” the Kernel API Manual moment 🌸

okay so bestie, we're in the Kernel API Manual today and the star of the show is fl_cap, no cap ✨


✨ NAME ✨

fl_cap β€” returns the capacity of a Free List πŸ’…


🌈 SYNOPSIS 🌈

unsigned int fl_cap (const struct sge_fl *fl );

like... that's the whole vibe. one function. one pointer. iconic. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fl β€” the Free List. yes queen, that's the one we're measuring πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

Returns the capacity of a Free List. that's it, that's the function, and yet 😭

here's the tea though β€” the capacity is less than the size, and there's a whole reason for that, so listen up. an Egress Queue Index Unit worth of descriptors has to be left unpopulated 🫢 otherwise the Producer and Consumer indices PIDX and CIDX will match, and the hardware will think the FL is empty. like, it will literally look at two equal numbers and go "empty bestie πŸ’€" and that's a whole problem we do not want. so we hold back that little buffer zone. slay for defensive engineering ✨

ngl this is one of those "small detail, huge consequences" situations. PIDX == CIDX means empty to the hardware, periodt. πŸ”₯

🧚 SEE ALSO 🧚

so you want the whole friend group? here's the whole friend group, grab a snack πŸ“

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

and the rest of the crew, all in (9) section:

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

mwah πŸ’‹ go read them, iykyk.


and that's the page, bestie 🫢 brought to you by ./drivers/net/ethernet/chelsio... β€” the source/version line, cutest little ellipsis in the whole kernel β€” dated October 2026. see you in the next manpage, stay hydrated πŸ’œβœ¨

πŸ“¦ where this page comes from