write_imm(9)
π write_imm(9) β ok so this is a kernel API manual page, bestie
Hey hi hello π«Ά you're reading write_imm(9), straight out of the Kernel API Manual. Buckle up, it's a short one but it's lowkey doing important work.
β¨ NAME β¨
write_imm β write a packet into a Tx descriptor as immediate data π
π¦ SYNOPSIS π¦
void write_imm (struct tx_desc *d , struct sk_buff *skb , unsigned int
len , unsigned int gen );
It returns void, so like⦠no return value to obsess over, she just does the thing and leaves. Iconic honestly.
πΈ ARGUMENTS πΈ
dβ the Tx descriptor you're writing into, bestie. This is the destination.skbβ the packet itself. The main character π«lenβ how much of the packet data you're writing as immediate data. Just the length, nothing extra.genβ the generation bit value to write. Yes, the generation bit. She has one. Slay.
π DESCRIPTION π
So what does she actually do? write_imm writes a packet as immediate data into a Tx descriptor. That's the whole vibe.
Now here's the part where you gotta be careful, ngl π β the packet contains a work request at its beginning. And because of that, we must write the packet carefully, so the SGE doesn't read it accidentally before it's written in its entirety. Like, do NOT let the SGE peek early, she will absolutely read the half-finished thing and it's giving chaos. Write it all the way through first. Periodt. π
Lowkey important: the careful-write thing isn't optional. The SGE reading a partially-written packet is the exact scenario we're avoiding here.
π₯ SEE ALSO π₯
Ok this list is long and honestly kind of iconic for it. All from the kernel file ./drivers/net/ethernet/chelsio/cxgb3/sge.c:
refill_rspq(9), need_skb_unmap(9), unmap_skb(9), free_tx_desc(9), reclaim_completed_tx(9), should_restart_tx(9), free_rx_bufs(9), add_one_rx_buf(9), refill_fl(9), recycle_rx_buf(9), alloc_ring(9), t3_reset_qset(9), t3_free_qset(9), init_qset_cntxt(9), sgl_len(9), flits_to_desc(9), get_packet(9), get_packet_pg(9), get_imm_packet(9), calc_tx_descs(9), write_sgl(9), check_ring_tx_db(9), write_wr_hdr_sgl(9), write_tx_pkt_wr(9), t3_eth_xmit(9), check_desc_avail(9), reclaim_completed_tx_imm(9), ctrl_xmit(9), restart_ctrlq(9), deferred_unmap_destructor(9), write_ofld_wr(9), calc_tx_descs_ofld(9), ofld_xmit(9), restart_offloadq(9), queue_set(9), is_ctrl_pkt(9), t3_offload_tx(9), offload_enqueue(9), deliver_partial_bundle(9), ofld_poll(9), rx_offload(9), restart_tx(9), cxgb3_arp_process(9), rx_eth(9), lro_add_page(9), handle_rsp_cntrl_info(9), check_ring_db(9), is_new_response(9), process_responses(9), napi_rx_handler(9), process_pure_responses(9), handle_responses(9), t3_intr_handler(9), t3_sge_err_intr_handler(9), sge_timer_tx(9), sge_timer_rx(9), t3_update_qset_coalesce(9), t3_sge_alloc_qset(9), t3_start_sge_timers(9), t3_stop_sge_timers(9), t3_free_sge_resources(9), t3_sge_start(9), t3_sge_stop_dma(9), t3_sge_stop(9), t3_sge_init(9), t3_sge_prep(9)
Yeah. That's the whole friend group. Go say hi π«Ά
β sign-off β
This page comes from ./drivers/net/ethernet/chelsio... and it's dated October 2026 β so like, future vibes, we love that for us π. That's write_imm(9), bestie. Go write your packets carefully. Mwah π
π¦ 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