ENUM OVS_SAMPLE_ATTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– enum ovs_sample_attr πŸ’–

okay bestie so this one's from the Kernel API Manual and it's literally the page for enum ovs_sample_attr β€” no cap, that's the whole vibe. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

enum ovs_sample_attr β€” the attributes for the %OVS_ACTION_ATTR_SAMPLE action. That's it, that's the whole thing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

enum ovs_sample_attr {
    OVS_SAMPLE_ATTR_PROBABILITY ,
    OVS_SAMPLE_ATTR_ACTIONS ,
    OVS_SAMPLE_ATTR_ARG

};

🌸 DESCRIPTION 🌸

So the way this works is: it executes the specified actions with the given probability on a per-packet basis. And nested actions will be able to access the probability value of the parent OVS_ACTION_ATTR_SAMPLE. Iconic behaviour honestly 🫢

✨ Constants ✨

  • OVS_SAMPLE_ATTR_PROBABILITY β€” a 32-bit fraction of packets to sample with OVS_ACTION_ATTR_SAMPLE. Like, a value of 0 samples no packets at all, a value of UINT32_MAX samples literally all the packets, and the intermediate values sample intermediate fractions of packets. Math slay πŸ’…
  • OVS_SAMPLE_ATTR_ACTIONS β€” the set of actions to execute in a sampling event. These actions get passed as nested attributes. Lowkey nesting queen 🧚
  • OVS_SAMPLE_ATTR_ARG β€” for in-kernel use, passing struct sample_arg derived from other attributes. iykyk πŸ’œ

⭐ SEE ALSO ⭐

go check out the kernel file ./include/uapi/linux/openvswitch.h plus all these besties:

  • struct ovs_header(9)
  • enum ovs_datapath_attr(9)
  • enum ovs_packet_attr(9)
  • enum ovs_vport_type(9)
  • enum ovs_vport_attr(9)
  • enum ovs_vport_upcall_attr(9)
  • enum ovs_frag_type(9)
  • enum ovs_flow_attr(9)
  • enum ovs_userspace_attr(9)
  • struct ovs_action_push_mpls(9)
  • struct ovs_action_add_mpls(9)
  • struct ovs_action_push_vlan(9)
  • enum ovs_ct_attr(9)
  • enum ovs_nat_attr(9)
  • struct ovs_action_push_eth(9)
  • enum ovs_check_pkt_len_attr(9)
  • enum ovs_psample_attr(9)
  • enum ovs_action_attr(9)

fr fr read them all, they're all main characters in this little kernel saga πŸ‘‘

aaaand that's the page bestie!! πŸ“ sign-off time: this one lives in ./include/uapi/linux and it's dated October 2026, so like β€” future vibes only πŸŒˆπŸ’– slay, go sample some packets πŸ¦‹

πŸ“¦ where this page comes from