STRUCT VIRTCHNL2_PTP_GET_CAPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 at enum virtchnl2_ptp_caps for 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_mbx is set to false.
  • If HW uses the secondary MBX for PTP, secondary_mbx is set to true.
  • 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_id and ptp_peer_id.
  • If HW does not use send to peer driver, secondary_mbx is a no-care field and peer_mbx_q_id holds an invalid value (0xFFFF).
⚠️ okay real talk for a sec β€” peer_mbx_q_id at 0xFFFF means 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