dev_add_offload(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 a struct 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 🌈

(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