STRUCT UDP_TUNNEL_NIC(9)
β¨ 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β thenetdevpointer. 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β au8bitfield that's set when at least one port start changed β¨need_replayβ au8bitfield 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 underentries. the way this is anunsigned intand 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
- 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