STRUCT UDP_TUNNEL_NIC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct udp_tunnel_nic(9) ✨

okay so bestie, welcome to the struct udp_tunnel_nic page β€” it lives in section 9 (that's the Kernel API Manual, iykyk) and it's literally the entire vibe of UDP tunnel port offload state 🫢


🌸 NAME 🌸

struct udp_tunnel_nic β€” UDP tunnel port offload state πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct udp_tunnel_nic {
    struct delayed_work work;
    struct net_device *dev;
    struct mutex lock;
    u8 need_sync:1;
    u8 need_replay:1;
    unsigned int n_tables;
    unsigned long missed;
    struct udp_tunnel_nic_table_entry *entries[];
 };

πŸŽ€ Members πŸŽ€

  • work β€” the async work that talks to the hardware from process context. not me calling it "talking to hardware" like it's a group chat, but fr that's the job πŸ’€
  • dev β€” the netdev pointer. the main character of this whole struct, ngl πŸ‘‘
  • lock β€” protects all the fields. every single one. do not skip the lock, bestie, that's the whole point πŸ™ˆ
  • need_sync β€” a u8 bitfield that's set when at least one port start changed ✨
  • need_replay β€” a u8 bitfield that's set when space was freed and we need a replay of all ports. so basically a "we gotta run it back" flag πŸŒ€
  • n_tables β€” the number of tables under entries. the way this is an unsigned int and not a bitfield… slay πŸŽ€
  • missed β€” a bitmap of tables which overflown. yes it's spelled "overflown" in the original, we're not fixing it, it ate πŸ’…
  • entries β€” a table of tables of ports currently offloaded. tables within tables, it's giving inception, it's giving nesting, it's giving [] flexible array member 🌈

πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./net/ipv4/udp_tunnel_nic.c β€” go read it, that's where the lore lives πŸ“–βœ¨

and that's the page, bestie!! πŸŽ€πŸ’– no cap, you now know the whole struct. the source is ./net/ipv4, dated October 2026, and honestly? iconic. go forth and offload those UDP tunnel ports πŸ¦‹β­πŸ’…

πŸ“¦ where this page comes from