cxgb4_sgetim_to_hwtstamp(9)
π cxgb4_sgetim_to_hwtstamp β bestie edition β¨
okay so you found yourself in the kernel API manual (section 9, the fun one π) and the function is cxgb4_sgetim_to_hwtstamp. say it with me: sge-tim to hw-timstamp. iconic name, honestly. it converts an sge time stamp into a hw time stamp, and yes that's the whole personality π
β¨ SYNOPSIS β¨
void cxgb4_sgetim_to_hwtstamp (struct adapter *adap , struct
skb_shared_hwtstamps *hwtstamps , u64 sgetstamp );
like, that's it. void return, three args, no notes. she's simple, she's effective π«Ά
πΈ ARGUMENTS πΈ
adapβ the adapter. your whole card, your whole vibe. main character energy πhwtstampsβ the time stamp structure to update. this is the one getting a glow-up in place, so bestie, it's being changed not copied πsgetstampβ the 60bit iqe timestamp. six-zero bits. no cap, that's a lot of bits π¦
π DESCRIPTION π
so every ingress queue entry has the 60-bit timestamp, right? literally every single one. this function takes that timestamp β which is in Core Clock ticks, important detail, don't forget it β converts it into ktime_t, and assigns it. that's the whole glow-up: Core Clock ticks in, ktime_t out, timestamp assigned β¨
not me being obsessed with a unit conversion. but fr fr, that's what she does π§
π SEE ALSO π
these all live in the Kernel file ./drivers/net/ethernet/chelsio/cxgb4/sge.c β same friend group, same source file, all of them repping the (9) section π
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)ctrlq_check_stop(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)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 is a whole friend group. read them all. i'm not skipping any, and neither should you π
and that's the page, bestie π«Ά this one shipped out of ./drivers/net/ethernet/chelsio... back in October 2026, and the whole thing is filed under cxgb4_sgetim_to_hwtstamp(9). go convert some timestamps, you've got this ππ
π¦ 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