STRUCT VIRTCHNL2_CREATE_VPORT(9)
π struct virtchnl2_create_vport
okay so bestie, we're deep in the Kernel API Manual today and this page is literally about one struct β the glow-up of vport creation info. it's giving "PF asks CP to make a vport" and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
struct virtchnl2_create_vport β Create vport config info. π
π SYNOPSIS π
struct virtchnl2_create_vport {
__le16 vport_type;
__le16 txq_model;
__le16 rxq_model;
__le16 num_tx_q;
__le16 num_tx_complq;
__le16 num_rx_q;
__le16 num_rx_bufq;
__le16 default_rx_q;
__le16 vport_index;
__le16 max_mtu;
__le32 vport_id;
u8 default_mac_addr[ETH_ALEN];
__le16 vport_flags;
__le64 rx_desc_ids;
__le64 tx_desc_ids;
u8 pad1[48];
__le64 inline_flow_caps;
__le64 sideband_flow_caps;
__le32 sideband_flow_actions;
__le32 flow_steer_max_rules;
__le32 rss_algorithm;
__le16 rss_key_size;
__le16 rss_lut_size;
__le32 rx_split_pos;
u8 pad2[20];
struct virtchnl2_queue_reg_chunks chunks;
};
like, look at her. every single field accounted for. no notes. π₯
πΈ Members πΈ
every field gets her moment, so let's go down the list one by one bestie:
vport_typeβ what kind of vport is this? checkenum virtchnl2_vport_typefor the deets.txq_modelβ the Tx queue model. seevirtchnl2_queue_model.rxq_modelβ the Rx queue model. also seevirtchnl2_queue_model.num_tx_qβ how many Tx queues we're working with.num_tx_complqβ only valid iftxq_modelis split queue. (not optional, just conditional, iykyk)num_rx_qβ how many Rx queues.num_rx_bufqβ only valid ifrxq_modelis split queue.default_rx_qβ the relative receive queue index that becomes the default. relative, bestie, don't forget.vport_indexβ this one's the β¨ main character β¨ of async alignment: it's used to align PF and CP when you've got multiple default vports. the PF fills it in, the CP returns the exact same value back. that way the driver can support multiple asynchronous parallelCREATE_VPORTrequests and still match a response to the specific request it came from. lowkey genius.max_mtuβ max MTU. CP populates this field on response.vport_idβ the vport id. CP populates this field on response.default_mac_addrβ the default MAC address.vport_flagsβ seeenum virtchnl2_vport_flags.rx_desc_idsβ see theVIRTCHNL2_RX_DESC_IDSdefinitions.tx_desc_idsβ see theVIRTCHNL2_TX_DESC_IDSdefinitions.pad1β Padding. (her job is spacing π )inline_flow_capsβ bit mask of supported inline-flow-steering flow types. seeenum virtchnl2_flow_types.sideband_flow_capsβ bit mask of supported sideband-flow-steering flow types. seeenum virtchnl2_flow_types.sideband_flow_actionsβ bit mask of supported action types for sideband flow steering. seeenum virtchnl2_action_types.flow_steer_max_rulesβ max rules allowed for inline and sideband flow steering combined. combined, bestie, they share the budget.rss_algorithmβ RSS algorithm.rss_key_sizeβ RSS key size.rss_lut_sizeβ RSS LUT size.rx_split_posβ seeenum virtchnl2_cap_rx_hsplit_at.pad2β Padding. again. she's just here for the alignment vibes πchunksβ chunks of contiguous queues.
π¦ Description π¦
okay so the actual plot: the PF sends this message over to the CP to create a vport, and it does that by filling in the required fields of the virtchnl2_create_vport structure. π¨
the CP then responds with the updated virtchnl2_create_vport structure β the one holding all the necessary fields β followed by chunks, which in turn will have an array of num_chunks entries of virtchnl2_queue_chunk structures. so the chunks are lowkey carrying their own little friend group of queue chunks. π¦
this whole thing is associated with VIRTCHNL2_OP_CREATE_VPORT. that's the op, that's the vibe check, that's the whole point. π
π SEE ALSO π
- 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_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)
like, that's a whole friend group and every single one of them said "yes bestie I'll link you". π
and that's the page!! mwah π this one came to you straight from ./include/linux/net/intel, dated October 2026 β go forth and create vports, you've got this, slay β¨ππ
π¦ 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