STRUCT OVS_NET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ovs_net(9) β€” the Kernel API Manual page, bestie edition πŸ¦‹

okay so real talk, this is a page from the Kernel API Manual and it's all about struct ovs_net β€” literally the per net-namespace data for ovs. that's it. that's the whole vibe. it's the lil backpack every network namespace carries around when it's doing openvswitch stuff πŸŽ€


✨ NAME ✨

struct ovs_net β€” Per net-namespace data for ovs. periodt πŸ’…


🌸 SYNOPSIS 🌸

here's the whole struct, copy it exactly, don't be weird about it:

struct ovs_net {
    struct list_head dps;
    struct work_struct dp_notify_work;
    struct delayed_work masks_rebalance;
  #if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT);
    struct ovs_ct_limit_info *ct_limit_info;
    struct ovs_ct_limit_info *ct_limit_exit_data;
  #endif;
    bool xt_label;
 };

like yes she has a #if IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT); block with the semicolons and everything, that's just how she is, we respect her πŸ’–


🫢 Members 🫢

okay now the main character energy part β€” every single member, no skipping:

  • dps β€” List of datapaths to enable dumping them all out. Protected by genl_mutex. πŸ”’ lowkey she's the whole point of the struct β€” this list is how you dump every datapath at once.
  • dp_notify_work β€” A work notifier to handle port unregistering. ngl she's doing the unglamorous cleanup work and we love her for it 🧹
  • masks_rebalance β€” A work to periodically optimize flow table caches. not her doing self-care on a schedule 😭✨ iconic.
  • ct_limit_info β€” Hash table of conntrack zone connection limits. Protected by RCU; updates and teardown are serialized by ovs_mutex. May be NULL during netns teardown. 🚨 bestie pls note that NULL β€” she can literally be NULL while the netns is tearing down, so vibe-check before you deref.
  • ct_limit_exit_data β€” CT limit state detached at .pre_exit, freed at .exit. she's in her exit arc πŸ’€
  • xt_label β€” Whether connlables are configured for the network or not. (connlables β€” that's the original's spelling fr fr, we don't touch it, we just report it πŸ™ˆ)

πŸ’€ friendly reminder that ct_limit_info and ct_limit_exit_data only exist when CONFIG_NETFILTER_CONNCOUNT is enabled, and ct_limit_info may be NULL during netns teardown. no cap, guard ya pointers.

πŸ”₯ SEE ALSO πŸ”₯

go read these next, i'm obsessed with the cross-references:

  • Kernel file ./net/openvswitch/datapath.h struct dp_stats_percpu(9)
  • struct dp_nlsk_pids(9)
  • struct datapath(9)
  • struct ovs_skb_cb(9)
  • struct dp_upcall_info(9)
  • enum ovs_pkt_hash_types(9)

and that's the whole page bestie, you ate that πŸ“

cute lil sign-off: this one lives in ./net/openvswitch, and it's dated October 2026 β€” put that on your calendar, mwah πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from