STRUCT VIRTCHNL2_GET_CAPABILITIES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hey bestie πŸ’– welcome to the struct virtchnl2_get_capabilities(9) page from the Kernel API Manual. the header up top is literally struct virt...capabilities(9), which is giving truncated main-character energy, but we're using the full name because she's iconic ✨

πŸ’– NAME πŸ’–

struct virtchnl2_get_capabilities β€” capabilities info. that's it, that's the name, and honestly it's serving exactly what it says on the label πŸŽ€

✨ SYNOPSIS ✨

here's the struct in all her glory, bestie β€” no cap, every field stays exactly as written:

       struct virtchnl2_get_capabilities {
           __le32 csum_caps;
           __le32 seg_caps;
           __le32 hsplit_caps;
           __le32 rsc_caps;
           __le64 rss_caps;
           __le64 other_caps;
           __le32 mailbox_dyn_ctl;
           __le16 mailbox_vector_id;
           __le16 num_allocated_vectors;
           __le16 max_rx_q;
           __le16 max_tx_q;
           __le16 max_rx_bufq;
           __le16 max_tx_complq;
           __le16 max_sriov_vfs;
           __le16 max_vports;
           __le16 default_num_vports;
           __le16 max_tx_hdr_size;
           u8 max_sg_bufs_per_tx_pkt;
           u8 pad[3];
           u8 reserved[4];
           __le32 device_type;
           u8 min_sso_packet_len;
           u8 max_hdr_buf_per_lso;
           __le16 num_rdma_allocated_vectors;
           u8 pad1[8];
        };

πŸŽ€ Members πŸŽ€

okay bestie, member-by-member vibe check. every one of these is literally in the struct, and every description detail is staying:

  • csum_caps β€” see enum virtchnl2_cap_txrx_csum.
  • seg_caps β€” see enum virtchnl2_cap_seg.
  • hsplit_caps β€” see enum virtchnl2_cap_rx_hsplit_at.
  • rsc_caps β€” see enum virtchnl2_cap_rsc.
  • rss_caps β€” see enum virtchnl2_flow_types.
  • other_caps β€” see enum virtchnl2_cap_other.
  • mailbox_dyn_ctl β€” DYN_CTL register offset and vector id for the mailbox provided by CP 🫢
  • mailbox_vector_id β€” mailbox vector id.
  • num_allocated_vectors β€” maximum number of allocated vectors for the device.
  • max_rx_q β€” maximum number of supported Rx queues.
  • max_tx_q β€” maximum number of supported Tx queues.
  • max_rx_bufq β€” maximum number of supported buffer queues.
  • max_tx_complq β€” maximum number of supported completion queues.
  • max_sriov_vfs β€” the PF sends the maximum VFs it is requesting; the CP responds with the maximum VFs granted.
  • max_vports β€” maximum number of vports that can be supported.
  • default_num_vports β€” default number of vports driver should allocate on load.
  • max_tx_hdr_size β€” max header length hardware can parse/checksum, in bytes.
  • max_sg_bufs_per_tx_pkt β€” max number of scatter gather buffers that can be sent per transmit packet without needing to be linearized.
  • pad β€” padding.
  • reserved β€” reserved.
  • device_type β€” see enum virtchl2_device_type.
  • min_sso_packet_len β€” min packet length supported by device for single segment offload.
  • max_hdr_buf_per_lso β€” max number of header buffers that can be used for an LSO.
  • num_rdma_allocated_vectors β€” maximum number of allocated RDMA vectors for the device.
  • pad1 β€” padding for future extensions.

🌸 Description 🌸

okay so the dataplane driver sends this message to CP to negotiate capabilities, and it hands over a virtchnl2_get_capabilities structure with its desired capabilities, max_sriov_vfs, and num_allocated_vectors. then CP responds with a virtchnl2_get_capabilities structure updated with the allowed capabilities and the other fields as below 🫢

here's the max_sriov_vfs tea: if the PF sets max_sriov_vfs as 0, CP responds with the max number of VFs that can be created by this PF. for any other value n, CP responds with max_sriov_vfs set to min(n, x) where x is the max number of VFs allowed by CP's policy. also max_sriov_vfs is not applicable for VFs β€” periodt.

and for num_allocated_vectors: if the dataplane driver sets num_allocated_vectors as 0, CP responds with 1, which is the default vector associated with the default mailbox. for any other value n, CP responds with a value <= n based on the CP's policy of max number of vectors for a PF.

CP also responds with the vector ID of the mailbox allocated to the PF in mailbox_vector_id, and the number of itr index registers in itr_idx_map. it also responds with the default number of vports that the dataplane driver should comeup with in default_num_vports, and the maximum number of vports that can be supported in max_vports πŸ¦‹

associated with VIRTCHNL2_OP_GET_CAPS ✨

πŸ’… SEE ALSO πŸ’…

the kernel file is ./include/linux/net/intel/virtchnl2.h, and here's the full bestie list β€” no skipping, every reference is invited to the group chat πŸ’–

  • 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_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_get_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)

that's the page, bestie 🫢 source/version is ./include/linux/net/intel, the date is October 2026, and the footer title is still the iconic struct virt...capabilities(9). byeee πŸ’…βœ¨

πŸ“¦ where this page comes from