STRUCT VIRTCHNL2_FLOW_RULE_ADD_DEL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct virtchnl2_flow_rule_add_del β€” bestie, this is the "add/delete a flow steering rule" struct, fresh from the Kernel API Manual πŸ’–


✨ SYNOPSIS ✨

struct virtchnl2_flow_rule_add_del {
    __le32 vport_id;
    __le32 count;
    struct virtchnl2_flow_rule_info rule_info[];
};

πŸŽ€ MEMBERS πŸŽ€

  • vport_id β€” the vport id for which the rule is gonna be added or deleted 🫢
  • count β€” how many rules we're adding or deleting, like a little headcount bestie ✨
  • rule_info β€” array of flow rules to be added or deleted. It's a flexible array member, she's giving main character energy πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so for VIRTCHNL2_OP_FLOW_RULE_ADD, rule_info contains a list of rules to be added. And here's the tea: if rule_id is 0xFFFFFFFF, then the rule is programmed and not cached πŸ‘€

For VIRTCHNL2_OP_FLOW_RULE_DEL, there are two possibilities, no cap. The structure can contain either an array of rule_ids or an array of match keys to be deleted. When match keys are used, the corresponding rule_ids must be 0xFFFFFFFF β€” that's the vibe check, don't skip it πŸ™ˆ

The status member of each rule indicates the result. Maximum of 6 rules can be added or deleted using this method πŸ”₯ Driver has to retry in case of any failure of the ADD or DEL opcode. CP doesn't retry in case of failure β€” so the retrying is literally the driver's job, periodt πŸ’€

ngl bestie, remember the 6-rule cap and the 0xFFFFFFFF rules, those are the two things that will bite you 😭

🌈 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_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)

Okay that's the whole read, bestie β€” go slay your flow steering πŸ§šπŸ’œ

Source file ./include/linux/net/intel, version dated October 2026, and yeah the header/footer both literally say struct virtc...rule_add_del(9) β€” iconic truncation, we love her πŸ’…

πŸ“¦ where this page comes from