STRUCT DATAPATH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct datapath(9) ✨ β€” Kernel API Manual

okay bestie, welcome to the Kernel API Manual πŸ’– β€” this is the page for struct datapath(9), and it's giving flow-based packet switching main character energy. Let's get into it. πŸ¦‹

🌸 NAME 🌸

struct datapath β€” the datapath for flow-based packet switching. Periodt. πŸ’…

✨ SYNOPSIS ✨

       struct datapath {
           struct rcu_head rcu;
           struct list_head list_node;
           struct flow_table table;
           struct hlist_head *ports;
           struct dp_stats_percpu __percpu *stats_percpu;
           possible_net_t net;
           u32 user_features;
           u32 max_headroom;
           struct dp_meter_table meter_tbl;
           struct dp_nlsk_pids *upcall_portids;
        };

πŸŽ€ Members πŸŽ€

  • rcu β€” the RCU callback head for deferred destruction, lowkey handling the β€œwe'll clean this up later” situation. πŸŽ€
  • list_node β€” this struct's element in the global dps list, fr fr. πŸ¦‹
  • table β€” flow table. That's it, that's the table. πŸ“
  • ports β€” hash table for ports. The OVSP_LOCAL port always exists, no cap. It's protected by ovs_mutex and RCU. πŸ”₯
  • stats_percpu β€” per-CPU datapath statistics, periodt. πŸ’…
  • net β€” reference to net namespace. 🌈
  • user_features β€” bitmap of enabled OVS_DP_F_* features. ⭐
  • max_headroom β€” the maximum headroom of all vports in this datapath; it will be used by all the internal vports in this dp. πŸ‘‘
  • meter_tbl β€” meter table. πŸ’œ
  • upcall_portids β€” RCU protected struct dp_nlsk_pids. 🫢

πŸ¦‹ Context πŸ¦‹

See the comment on locking at the top of datapath.c for additional locking information. For the extra locking tea, that's where you go, bestie. πŸ’–

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./net/openvswitch/datapath.h, plus struct dp_stats_percpu(9), struct dp_nlsk_pids(9), struct ovs_skb_cb(9), struct dp_upcall_info(9), struct ovs_net(9), and enum ovs_pkt_hash_types(9). Go read the whole squad, iykyk. πŸ’…βœ¨

And that's the whole page, bestie 🫢 β€” source/version: ./net/openvswitch, dated October 2026. Stay iconic, keep your flows flowin', and may your deferred destruction be very deferred. πŸ’…βœ¨
πŸ“¦ where this page comes from