STRUCT VIRTCHNL2_LOOPBACK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… STRUCT VIRTCHNL2_LOOPBACK(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for struct virtchnl2_loopback, aka the lil message that flips your vport into (and out of) loopback mode. it's giving "small struct, big responsibilities" and honestly? iconic. ✨


🌸 SYNOPSIS 🌸

here's the whole struct, literally the entire thing, no cap:

struct virtchnl2_loopback {
    __le32 vport_id;
    u8 enable;
    u8 pad[3];
 };

that's it. that's the queen. three fields and a vibe. πŸŽ€


πŸ¦‹ MEMBERS πŸ¦‹

  • vport_id β€” the Vport id, fr fr. it's a __le32, so yes, endianness matters, don't come for me.
  • enable β€” the on/off switch. enable/disable, that's the whole job. a u8 living its best life.
  • pad β€” padding for future extensions. it's u8 pad[3], just sitting there, holding space for the future like a true main character. πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so here's the tea: PF/VF sends this message to transition to/from the loopback state. that's the entire plot.

setting 'enable' to 1 enables the loopback state, and setting 'enable' to 0 disables it. one or zero, no in between, no "it's complicated". 🫢

then CP configures the state to loopback and returns status β€” so like, CP does the actual work and reports back, and you just wait for the status like πŸ‘€

this whole thing is associated with VIRTCHNL2_OP_LOOPBACK. write that down. iykyk. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

the full squad, and yes i'm listing every single one because we don't do "etc." in this house:

  • 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_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, the whole friend group showed up. love that for them. πŸ’œ


okay that's the page!! and before i go β€” this one lives in the kernel source at ./include/linux/net/intel, last touched October 2026, page struct virtchnl2_loopback(9) of the Kernel API Manual. periodt. go read the header file bestie, mwah πŸ§šπŸ’…πŸ”₯

πŸ“¦ where this page comes from