STRUCT VPORT_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct vport_ops(9) πŸ¦‹

hey bestie, welcome to the Kernel API Manual β€” this is the struct vport_ops(9) page, and it is literally the definition of a type of virtual port. main character struct energy, no cap. πŸ’…


πŸ’– NAME πŸ’–

struct vport_ops β€” definition of a type of virtual port. periodt.


✨ SYNOPSIS ✨

okay so here is the whole struct, exactly as it is, bestie:

struct vport_ops {
    enum ovs_vport_type type;
    struct vport *(*create)(const struct vport_parms *);
    void (*destroy)(struct vport *);
    int (*send)(struct sk_buff *skb);
    struct list_head list;
};

🫢 Members 🫢

  • type β€” the OVS_VPORT_TYPE_* value for this type of virtual port. it's giving "which flavor of vport are we today" ✨
  • create β€” create a new vport configured as specified. on success it returns a new vport allocated with ovs_vport_alloc; otherwise it returns an ERR_PTR value. iconic behavior, honestly. πŸ’–
  • destroy β€” destroys a vport. it must call vport_free on the vport, but not before an RCU grace period has elapsed. this is the serious part, bestie β€” do not skip the grace period. 😭
  • send β€” send a packet on the device. zero for dropped packets or negative for error. that's the whole mood. πŸ”₯
  • list β€” list entry in the global list of vport types. it's in the group chat now. πŸ‘‘

🌈 SEE ALSO 🌈

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

signed off from ./net/openvswitch, October 2026, on the struct vport_ops(9) page β€” slay and read the source, bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from