ENUM OVS_DATAPATH_ATTR(9)
π« NAME π«
enum ovs_datapath_attr β bestie, this is the enum that holds all the attributes for the %OVS_DP_* commands. It's from the Kernel API Manual and it's giving very much "kernel plumbing but make it cute" β¨
β¨ SYNOPSIS β¨
enum ovs_datapath_attr {
OVS_DP_ATTR_NAME ,
OVS_DP_ATTR_UPCALL_PID ,
OVS_DP_ATTR_STATS ,
OVS_DP_ATTR_MEGAFLOW_STATS ,
OVS_DP_ATTR_USER_FEATURES ,
OVS_DP_ATTR_MASKS_CACHE_SIZE ,
OVS_DP_ATTR_PER_CPU_PIDS ,
OVS_DP_ATTR_IFINDEX
};
Like, that's the whole lineup π eight constants, no notes.
π Constants π
Okay so here's the tea on each one, in order, no skipping π«Ά
OVS_DP_ATTR_NAMEβ the name of the network device that serves as the "local port". It's the name of the network device whosedp_ifindexis given in thestruct ovs_header. It's always present in notifications, and it's required inOVS_DP_NEWrequests. It may also be used as an alternative to specifyingdp_ifindexin other requests (with adp_ifindexof0) π¦OVS_DP_ATTR_UPCALL_PIDβ the Netlink socket in userspace that's initially set on the datapath port (forOVS_ACTION_ATTR_MISS). Heads up: it's only valid onOVS_DP_CMD_NEWrequests. A value of zero means upcalls should not be sent. Zero = silence, periodt πOVS_DP_ATTR_STATSβ statistics about packets that have passed through the datapath. Always present in notifications πOVS_DP_ATTR_MEGAFLOW_STATSβ statistics about mega flow masks usage for the datapath. Also always present in notifications. Mega flow, mega vibes β¨OVS_DP_ATTR_USER_FEATURESβ literally just theOVS_DP_F_*flags, that's it, that's the attribute πOVS_DP_ATTR_MASKS_CACHE_SIZEβ the number of the entries in the flow table masks cache π’OVS_DP_ATTR_PER_CPU_PIDSβ per-cpu array of PIDs for upcalls, used when theOVS_DP_F_DISPATCH_UPCALL_PER_CPUfeature is set. One PID per CPU, so organized πOVS_DP_ATTR_IFINDEXβ interface index for a new datapath netdev. Only valid forOVS_DP_CMD_NEWrequests β don't try it anywhere else bestie, it's not for that π
πΈ Description πΈ
So these attributes follow the struct ovs_header inside the Generic Netlink payload for the OVS_DP_* commands. That's the whole vibe check β header first, then these attributes trailing right behind it π§
β SEE ALSO β
Go read these next, iykyk π
- Kernel file
./include/uapi/linux/openvswitch.h struct ovs_header(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_sample_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)
Okay that's the whole page! It lives in ./include/uapi/linux, and this lil edition is dated October 2026. Go off, kernel bestie, you ate π
π₯π
π¦ 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