ENUM OVS_DATAPATH_ATTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 whose dp_ifindex is given in the struct ovs_header. It's always present in notifications, and it's required in OVS_DP_NEW requests. It may also be used as an alternative to specifying dp_ifindex in other requests (with a dp_ifindex of 0) πŸ¦‹
  • OVS_DP_ATTR_UPCALL_PID β€” the Netlink socket in userspace that's initially set on the datapath port (for OVS_ACTION_ATTR_MISS). Heads up: it's only valid on OVS_DP_CMD_NEW requests. 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 the OVS_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 the OVS_DP_F_DISPATCH_UPCALL_PER_CPU feature is set. One PID per CPU, so organized πŸ’œ
  • OVS_DP_ATTR_IFINDEX β€” interface index for a new datapath netdev. Only valid for OVS_DP_CMD_NEW requests β€” 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