libie_ctlq_send_desc_avail(9)
π libie_ctlq_send_desc_avail β the kernel API manual, bestie edition β¨
okay so this one's a little function from the libie kernel API manual (that's the libie_ctlq_send_desc_avail(9) page, section 9, kernel devs only π«Ά). it does exactly one thing and it does it iconically: it tells you how much room is left on a Tx control queue. that's it. that's the whole vibe. π
β¨ NAME β¨
libie_ctlq_send_desc_avail β get the number of free descriptors on a Tx ctlq π
πΈ SYNOPSIS πΈ
u32 libie_ctlq_send_desc_avail (const struct libie_ctlq_info *ctlq );
π¦ ARGUMENTS π¦
ctlqβ the specific control queue that's gonna be used for sending messages π
β DESCRIPTION β
so here's the tea β β the caller must hold ctlq->lock. like, not optional. you're holding it. periodt.
and any dependent sending has to happen in the same critical section. don't drop the lock and go do your little send somewhere else, that's not the move, that's giving race condition energy π
π₯ RETURN π₯
the number of available descriptors/messages on a given control queue. slay. that's the whole return value, u32, no cap β¨
π SEE ALSO π
the kernel file this lives in, bestie:
./drivers/net/ethernet/intel/libie/controlq.c
and the whole friend group π«Ά (iykyk, these all cross-reference each other):
libie_ctlq_free_fq(9),libie_ctlq_init_fq(9),libie_ctlq_prep_rx_desc(9),libie_ctlq_post_rx_buffs(9),libie_ctlq_free_tx_msgs(9),libie_ctlq_alloc_tx_msgs(9),libie_cp_free_desc_mem(9),libie_ctlq_dealloc_ring_res(9),libie_cp_alloc_desc_mem(9),libie_ctlq_alloc_queue_res(9),libie_ctlq_init_regs(9),libie_find_ctlq(9),libie_ctlq_add(9),libie_ctlq_remove(9),libie_ctlq_init(9),libie_ctlq_deinit(9),libie_ctlq_tx_desc_from_msg(9),libie_ctlq_send(9),libie_ctlq_send_clean(9),libie_ctlq_fill_rx_msg(9),libie_ctlq_recv(9),libie_ctlq_xn_pop_free(9),__libie_ctlq_xn_push_free(9),libie_ctlq_xn_push_free(9),libie_ctlq_xn_deinit_dma(9),libie_ctlq_xn_init_dma(9),libie_ctlq_xn_process_recv(9),libie_xn_check_async_timeout(9),libie_ctlq_xn_recv(9),libie_cp_map_dma_mem(9),libie_cp_unmap_dma_mem(9),libie_ctlq_xn_process_send(9),libie_ctlq_xn_send(9),struct libie_ctlq_xn_rel_tx_ctx(9),libie_ctlq_xn_rel_tx_buf(9),libie_ctlq_xn_send_clean(9),libie_ctlq_xn_shutdown(9),libie_ctlq_xn_deinit(9),libie_ctlq_xn_init(9)
π«Ά quick vibe check before you go: lock held, send in the same critical section, no exceptions. that's the whole assignment.
okay that's the page!! it came from ./drivers/net/ethernet/intel/l... and it's dated October 2026 β yeah, future-dated, main character energy fr fr ππ mwah, go hold that lock bestie π
β¨
π¦ 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