STRUCT VIRTCHNL2_PTP_GET_CAPS(9)
π struct virtchnl2_ptp_get_caps β Kernel API Manual β¨
okay so bestie, buckle up, we're in the struct virt...ptp_get_caps(9) zone π
this is a kernel API page, it's giving very much "networking girlie reads C headers at 2am" energy, and honestly? iconic. let's get into it π
πΈ NAME πΈ
struct virtchnl2_ptp_get_caps β literally just "Get PTP capabilities", that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
struct virtchnl2_ptp_get_caps {
__le32 caps;
__le32 max_adj;
__le64 base_incval;
__le16 peer_mbx_q_id;
u8 peer_id;
u8 secondary_mbx;
u8 pad[4];
struct virtchnl2_ptp_clk_reg_offsets clk_offsets;
struct virtchnl2_ptp_cross_time_reg_offsets cross_time_offsets;
struct virtchnl2_ptp_clk_adj_reg_offsets clk_adj_offsets;
};
no cap, every field is right there in the struct, we are NOT skipping any of them π
π¦ Members π¦
capsβ the PTP capability bitmap β¨ peek atenum virtchnl2_ptp_capsfor the deets.max_adjβ the maximum possible frequency adjustment. how much can we tweak? that much πbase_incvalβ the default timer increment value. the starting point of the whole clock situation β°peer_mbx_q_idβ the ID of the PTP Device Control daemon queue πpeer_idβ the peer ID for the PTP Device Control daemon, like its little name tag π·οΈsecondary_mbxβ this one tells the driver it should create a secondary mailbox to inetract with the control plane for PTP, lowkey very important (yes, "inetract", the original said it, I'm just the messenger π).padβ padding for future extensions π future-proofing bestie, we love to see it.clk_offsetsβ main timer and PHY registers offsets π§cross_time_offsetsβ cross time registers offsets βclk_adj_offsetsβ offsets needed to adjust the PHY and the main timer π₯
π Description π
so the PF/VF sends this message to negotiate PTP capabilities β¨. the CP then updates the bitmap with the supported features and fulfills the appropriate structures β very "I got you bestie, here's what's actually supported" energy π«Ά.
here's the mailbox breakdown, and yes you need to know this:
- If HW uses the primary MBX for PTP,
secondary_mbxis set tofalse. - If HW uses the secondary MBX for PTP,
secondary_mbxis set totrue. - The control plane has 2 MBX and the driver has 1 MBX, so send-to-peer-driver may be used to send a message using a valid
ptp_peer_mb_q_idandptp_peer_id. - If HW does not use send to peer driver,
secondary_mbxis a no-care field andpeer_mbx_q_idholds an invalid value (0xFFFF).
β οΈ okay real talk for a sec βpeer_mbx_q_idat0xFFFFmeans invalid, so don't go treating that like a real queue ID, bestie π
this whole thing is associated with VIRTCHNL2_OP_PTP_GET_CAPS, iykyk π
π SEE ALSO π
the whole friend group showed up, fr fr π«Ά:
- Kernel file
./include/linux/net/intel/virtchnl2.h enum virtchnl2_vport_type(9)enum virtchnl2_queue_model(9)enum virtchnl2_action_types(9)enum virtchnl2_txq_sched_mode(9)enum virtchnl2_rxq_flags(9)enum virtchnl2_mac_addr_type(9)struct virtchnl2_edt_caps(9)struct virtchnl2_version_info(9)struct virtchnl2_get_capabilities(9)struct virtchnl2_queue_reg_chunk(9)struct virtchnl2_queue_reg_chunks(9)enum virtchnl2_vport_flags(9)struct virtchnl2_create_vport(9)struct virtchnl2_vport(9)struct virtchnl2_txq_info(9)struct virtchnl2_config_tx_queues(9)struct virtchnl2_rxq_info(9)struct virtchnl2_config_rx_queues(9)struct virtchnl2_add_queues(9)struct virtchnl2_vector_chunk(9)struct virtchnl2_vector_chunks(9)struct virtchnl2_alloc_vectors(9)struct virtchnl2_rss_lut(9)struct virtchnl2_rss_hash(9)struct virtchnl2_sriov_vfs_info(9)struct virtchnl2_ptype(9)struct virtchnl2_get_ptype_info(9)struct virtchnl2_vport_stats(9)struct virtchnl2_event(9)struct virtchnl2_rss_key(9)struct virtchnl2_queue_chunk(9)struct virtchnl2_del_ena_dis_queues(9)struct virtchnl2_queue_vector(9)struct virtchnl2_queue_vector_maps(9)struct virtchnl2_loopback(9)struct virtchnl2_mac_addr_list(9)struct virtchnl2_promisc_info(9)enum virtchnl2_ptp_caps(9)struct virtchnl2_ptp_clk_reg_offsets(9)struct virtchnl2_ptp_cross_time_reg_offsets(9)struct virtchnl2_ptp_clk_adj_reg_offsets(9)struct virtchnl2_ptp_tx_tstamp_latch_caps(9)struct virtchnl2_ptp_get_vport_tx_tstamp_caps(9)struct virtchnl2_ptp_tx_tstamp_latch(9)struct virtchnl2_ptp_get_vport_tx_tstamp_latches(9)struct virtchnl2_ptp_get_dev_clk_time(9)struct virtchnl2_ptp_get_cross_time(9)struct virtchnl2_ptp_set_dev_clk_time(9)struct virtchnl2_ptp_adj_dev_clk_fine(9)struct virtchnl2_ptp_adj_dev_clk_time(9)struct virtchnl2_mem_region(9)struct virtchnl2_get_lan_memory_regions(9)struct virtchnl2_proto_hdr(9)struct virtchnl2_proto_hdrs(9)struct virtchnl2_rule_action(9)struct virtchnl2_rule_action_set(9)struct virtchnl2_flow_rule(9)struct virtchnl2_flow_rule_info(9)struct virtchnl2_flow_rule_add_del(9)
and that's the whole page bestie, you ate that π
β¨ this one lives at ./include/linux/net/intel, dated October 2026, and it's filed under struct virt...ptp_get_caps(9) β go forth and negotiate those capabilities, main character ππ¦
π¦ 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