ENUM OVS_SAMPLE_ATTR(9)
π 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 withOVS_ACTION_ATTR_SAMPLE. Like, a value of0samples no packets at all, a value ofUINT32_MAXsamples 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, passingstruct sample_argderived 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms