STRUCT VPORT_PORTIDS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct vport_portids(9) πŸ’–

okay so bestie, welcome to the kernel API manual, this one's a struct page and it's lowkey iconic β€” it lives in the OVS corner of the kernel and it's all about keeping track of netlink portids for a vport πŸŽ€


✨ NAME ✨

struct vport_portids β€” an array of netlink portids of a vport. and like, must be protected by rcu. that's not a suggestion, that's the whole vibe check, fr fr πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct vport_portids {
    struct reciprocal_value rn_ids;
    struct rcu_head rcu;
    u32 n_ids;
    u32 ids[];
};

look at her. flexible array member and everything. main character energy πŸ‘‘


🌸 Members 🌸

  • rn_ids β€” the reciprocal value of n_ids. it's giving "precomputed math so we don't have to divide" honestly 🧚
  • rcu β€” the RCU callback head for deferred destruction. so when she's gotta go, she goes gracefully after a grace period πŸ’€
  • n_ids β€” size of the ids array. bestie, it's literally the count πŸ“
  • ids β€” the array storing the Netlink socket pids that get used for packets received on this port when they miss the flow table. yeah, the fallback squad πŸ™ˆ

⭐ SEE ALSO ⭐

  • kernel file ./net/openvswitch/vport.h
  • struct vport(9)
  • struct vport_parms(9)
  • struct vport_ops(9)
  • struct vport_upcall_stats_percpu(9)
  • vport_priv(9)
  • vport_from_priv(9)

go read the whole family, they're all slaying in their own way 🫢


ngl this page is short but she's important β€” and remember: protected by rcu. no cap. 😭

okay bye bestie!! this was the kernel API manual, struct vport_portids(9), coming at you from ./net/openvswitch and dated October 2026 β€” mwah, stan the kernel, drink water, and always hold your RCU read lock πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from