STRUCT VIRTCHNL2_CREATE_VPORT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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? check enum virtchnl2_vport_type for the deets.
  • txq_model β€” the Tx queue model. see virtchnl2_queue_model.
  • rxq_model β€” the Rx queue model. also see virtchnl2_queue_model.
  • num_tx_q β€” how many Tx queues we're working with.
  • num_tx_complq β€” only valid if txq_model is split queue. (not optional, just conditional, iykyk)
  • num_rx_q β€” how many Rx queues.
  • num_rx_bufq β€” only valid if rxq_model is 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 parallel CREATE_VPORT requests 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 β€” see enum virtchnl2_vport_flags.
  • rx_desc_ids β€” see the VIRTCHNL2_RX_DESC_IDS definitions.
  • tx_desc_ids β€” see the VIRTCHNL2_TX_DESC_IDS definitions.
  • pad1 β€” Padding. (her job is spacing πŸ’…)
  • inline_flow_caps β€” bit mask of supported inline-flow-steering flow types. see enum virtchnl2_flow_types.
  • sideband_flow_caps β€” bit mask of supported sideband-flow-steering flow types. see enum virtchnl2_flow_types.
  • sideband_flow_actions β€” bit mask of supported action types for sideband flow steering. see enum 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 β€” see enum 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