STRUCT VIRTCHNL2_RULE_ACTION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct virtchnl2_rule_action(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9 πŸŽ€ β€” this one's about struct virtchnl2_rule_action(9), which is literally the struct representing a single action for a flow. yes. one action. one flow. she's a whole vibe and she's here to tell the hardware what to do with your packets πŸ’…


✨ SYNOPSIS ✨

struct virtchnl2_rule_action {
    __le32 action_type;
    union {
      __le32 q_id;
      __le32 q_grp_id;
      __le32 ctr_id;
      __le32 mark_id;
      u8 reserved[8];
    } act_conf;
 };

like, look at her. action_type up top doing main character energy, and then act_conf is a whole union that shapeshifts depending on what kind of action you picked πŸ¦‹


🌸 Members 🌸

  • action_type β€” this tells you what kind of action it is. peep enum virtchnl2_action_types for the menu of options, iykyk ✨
  • act_conf β€” the union carrying the actual action payload, and which field you read depends entirely on action_type. no cap, it's giving "choose your own adventure" πŸ’«

πŸ’œ act_conf.q_id

queue id to redirect the packets to. point the packets here, that's it, that's the whole job 🫢

πŸ’œ act_conf.q_grp_id

queue group id to redirect the packets to β€” same idea as q_id but a whole squad of queues instead of just one πŸ‘‘

πŸ’œ act_conf.ctr_id

this one's for the count action, and it's lowkey the most interesting one 😭 so listen up fr fr:

  • if the input value is 0xFFFFFFFF, the control plane assigns a brand new counter and hands the counter ID back to the driver ✨
  • if the input value is not 0xFFFFFFFF, then it has to be an existing counter that was already given to the driver for an earlier flow β€” and then this flow will share that counter 🫢

πŸ’œ act_conf.mark_id

the value used to mark the packets. this is the mark action's whole thing, periodt πŸŽ€

πŸ’œ act_conf.reserved

reserved for future use πŸ™ˆ β€” so hands off, she's not for you yet


πŸ”₯ SEE ALSO πŸ”₯

literally the whole friend group, and I'm not skipping a single one:

  • 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_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_set(9)
  • struct virtchnl2_flow_rule(9)
  • struct virtchnl2_flow_rule_info(9)
  • struct virtchnl2_flow_rule_add_del(9)

like I said β€” the entire friend group. go say hi πŸ¦‹


and that's the whole page, bestie!! this one lives in ./include/linux/net/intel and it's stamped October 2026 ⭐ so when you're flipping through the kernel headers and this title pops up, you'll know exactly who she is. slay, go read the source, mwah πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from