STRUCT VPORT(9)
πΈ NAME πΈ
struct vport β literally one port inside a datapath, that's the whole vibe π
(this is a page from the struct vport(9) manual, bestie, section 9, Kernel API Manual energy β¨)
β¨ SYNOPSIS β¨
ok so here's the whole struct, no cap, copy it exactly:
struct vport {
struct net_device *dev;
netdevice_tracker dev_tracker;
struct datapath *dp;
struct vport_portids *upcall_portids;
u16 port_no;
struct hlist_node hash_node;
struct hlist_node dp_hash_node;
const struct vport_ops *ops;
struct vport_upcall_stats_percpu __percpu *upcall_stats;
struct list_head detach_list;
struct rcu_head rcu;
};
π MEMBERS π
bestie, let's go through every single field one by one, because they ALL matter π«Ά
devβ a pointer to anet_device. yeah. that's it. iconic.dev_trackerβ anetdevice_trackerβ it's the refcount tracker for thedevreference, so we know who's holding on to it πdpβ the datapath that this port belongs to. its home. its main character datapath πupcall_portidsβ an RCU protectedstruct vport_portidsβ (RCU protected, remember that, it's important)port_noβ the index intodp's ports array. au16, tiny but mighty πhash_nodeβ this is the element in thedev_tablehash table invport.cπdp_hash_nodeβ and THIS one is the element indatapath->portshash table indatapath.c. two hash nodes, two files, iykyk πopsβ the class structure. slay.upcall_statsβ upcall stats of every ports π₯ (yes, "every ports", that's the original wording, we don't gatekeep)detach_listβ the list used for detaching vport in the net-exit call. bye bestie πrcuβ RCU callback head for deferred destruction. it's giving cleanup era π
π₯ SEE ALSO π₯
go read these too, they're all in the family:
- Kernel file
./net/openvswitch/vport.h struct vport_portids(9)struct vport_parms(9)struct vport_ops(9)struct vport_upcall_stats_percpu(9)vport_priv(9)vport_from_priv(9)
ok that's the whole page, mwah π this one comes from ./net/openvswitch and it's dated October 2026 β so future-y, so cunty, so struct vport(9) βπ¦β¨
π¦ 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