dev_add_offload(9)
π dev_add_offload(9) π
okay bestie, welcome to the Kernel API Manual β this one's short, sweet, and honestly kinda iconic for how much it doesn't promise you. let's get into it π«Ά
β¨ NAME β¨
dev_add_offload β register offload handlers
like... it registers offload handlers. that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
void dev_add_offload (struct packet_offload *po );
π ARGUMENTS π
poβ the protocol offload declaration. yeah that's it, that's the whole parameter. she's astruct packet_offload *and she's ready to be linked up β¨
π¦ DESCRIPTION π¦
so what this does is: add protocol offload handlers to the networking stack. simple! the proto_offload you pass in gets linked into kernel lists β and here's the important part, bestie, so pay attention π β it may not be freed until it has been removed from the kernel lists. like, do not free that thing while it's still chained up in a list, that's not a vibe, that's a crash waiting to happen. π
and now the part that lowkey breaks everyone's heart: this call does not sleep. which is great for lots of reasons, but it also means it can not guarantee that all the CPUs that are currently in the middle of receiving packets will actually see the new offload handlers. nope. not until the next received packet, anyway. so there's a lil window there where some CPU is just out here living its life, unaware of your new handler. it's giving "seen at 3am, replied at 9am" energy fr fr π
ngl this is one of those "read the fine print" functions β the fine print being the whole point. it does not sleep, and it makes zero promises about CPUs mid-packet. periodt.
π SEE ALSO π
- Kernel file
./net/core/gro.c __dev_remove_offload(9)dev_remove_offload(9)
(that's the other half of the duo β you add her, you remove her, you keep the lists clean. balanced, as all things should be π§)
and that's the whole page, bestie! π this lil icon lives in ./net/core and the docs are dated October 2026 β so go forth, register those offload handlers, don't free them early, and remember: no sleeping on the job π΄π« π₯π
slay, bye! π
π¦ 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