ctrlq_check_stop(9)
π ctrlq_check_stop(9) β a Kernel API Manual moment
okay so bestie, we're diving into the Kernel API Manual and today's main character is ctrlq_check_stop(9) β¨ like yes, it's a real one, and no, it's not scary β it's literally just a vibe check for your control queue π
πΈ NAME πΈ
ctrlq_check_stop β checks whether a control queue is full and should, in fact, stop π
β¨ SYNOPSIS β¨
void ctrlq_check_stop (struct sge_ctrl_txq *q , struct fw_wr_hdr *wr );
no cap, that's the whole signature π void return, two args, clean, iconic.
π«Ά ARGUMENTS π«Ά
qβ the queue π like, the actual control queue we're checking on. she's the one being vibe-checked.wrβ the most recent WR written to the queue π the freshest work request, the one that just showed up to the party.
π¦ DESCRIPTION π¦
So here's the tea β: this function checks if a control queue has become full and should be stopped. That's it, that's the job β a little fullness check, a little "hey bestie, you good?" energy π
And the way this codebase handles cleanup? very lazily π We clean up control queue descriptors only when we are out β like genuinely out, no descriptors left, that's the moment we finally do the dishes. Not before. Never before. periodt.
Then, if the queue is still full after reclaiming any completed descriptors, we suspend it π΄ and we have the last WR wake it up π β the last work request is basically the designated alarm clock, dragging the whole queue back to consciousness. iykyk.
π SEE ALSO π
Kernel file ./drivers/net/ethernet/chelsio/cxgb4/sge.c β go read her, she's got lore π
and literally the entire extended friend group, all present and accounted for, no one left behind π«Ά:
txq_avail(9)fl_cap(9)fl_starving(9)deferred_unmap_destructor(9)free_tx_desc(9)reclaim_completed_tx(9)cxgb4_reclaim_completed_tx(9)free_rx_bufs(9)unmap_rx_buf(9)refill_fl(9)alloc_ring(9)sgl_len(9)flits_to_desc(9)is_eth_imm(9)calc_tx_flits(9)cxgb4_write_sgl(9)cxgb4_ring_tx_db(9)cxgb4_inline_tx_skb(9)t4_sge_eth_txq_egress_update(9)cxgb4_eth_xmit(9)t4vf_is_eth_imm(9)t4vf_calc_tx_flits(9)cxgb4_vf_eth_xmit(9)reclaim_completed_tx_imm(9)cxgb4_ethofld_send_flowc(9)is_imm(9)ctrl_xmit(9)restart_ctrlq(9)t4_mgmt_tx(9)is_ofld_imm(9)calc_tx_flits_ofld(9)txq_stop_maperr(9)ofldtxq_stop(9)service_ofldq(9)ofld_xmit(9)restart_ofldq(9)skb_txq(9)is_ctrl_pkt(9)t4_ofld_send(9)cxgb4_ofld_send(9)ofld_xmit_direct(9)t4_crypto_send(9)cxgb4_crypto_send(9)cxgb4_pktgl_to_skb(9)t4_pktgl_free(9)cxgb4_sgetim_to_hwtstamp(9)t4_systim_to_hwstamp(9)t4_rx_hststamp(9)t4_tx_hststamp(9)t4_tx_completion_handler(9)t4_ethrx_handler(9)restore_rx_bufs(9)is_new_response(9)rspq_next(9)process_responses(9)napi_rx_handler(9)t4_intr_handler(9)bar2_address(9)t4_sge_alloc_eth_txq(9)t4_free_sge_resources(9)t4_sge_stop(9)t4_sge_init_soft(9)t4_sge_init(9)
like, that's a whole contact list bestie π do not lose it, i'm begging π
and that's the page, babes π source is ./drivers/net/ethernet/chelsio... and it's dated October 2026 β ctrlq_check_stop(9), signing off π
β¨ slay responsibly π₯
π¦ 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