STRUCT VIRTCHNL2_GET_CAPABILITIES(9)
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β seeenum virtchnl2_cap_txrx_csum.seg_capsβ seeenum virtchnl2_cap_seg.hsplit_capsβ seeenum virtchnl2_cap_rx_hsplit_at.rsc_capsβ seeenum virtchnl2_cap_rsc.rss_capsβ seeenum virtchnl2_flow_types.other_capsβ seeenum virtchnl2_cap_other.mailbox_dyn_ctlβDYN_CTLregister 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β seeenum 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
- 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