napi_disable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ napi_disable πŸ¦‹

okay so real quick β€” this page is from the Kernel API Manual, and bestie, it's a short one but it's lowkey important, so let's get into it πŸ’…


✨ NAME ✨

napi_disable β€” literally just: prevent NAPI from scheduling. that's the whole vibe check πŸŽ€


🌸 SYNOPSIS 🌸

void napi_disable (struct napi_struct *n );

like yes, that's it. no cap, one argument, returns nothing. main character energy but make it void πŸ’–


🧚 ARGUMENTS 🧚

  • n β€” the NAPI context 🫢 that's the thing you're about to put on pause, bestie.

πŸ”₯ DESCRIPTION πŸ”₯

So what does it actually do? It stops NAPI from being scheduled on this context ✨ periodt. That's the headline.

And then β€” the way that it's not just a "flip a bit and dip" situation β€” it waits till any outstanding processing completes 😭 like it's not gonna leave the party until every last thing finishes. respectful honestly.

Also: it takes netdev_lock for the associated net_device πŸ‘‘ so yeah, it's grabbing a lock on the way in, iykyk. plan accordingly.

ngl, "waits till any outstanding processing completes" + "takes netdev_lock" is the part that matters most here β€” this call can block on you, so don't be caught off guard πŸ™ˆ

⭐ SEE ALSO ⭐

alright bestie, buckle up, this list is iconic and also extremely long πŸŽ€πŸ’€ and yes we're keeping every single one, because that's what slay means:

oh and the source file for all of this is Kernel file ./net/core/dev.c πŸ¦‹ go read it if you're feeling brave, i believe in you 🫢


and that's the whole page bestie πŸ’– mwah πŸ’…

so like, credit where it's due β€” this one came out of ./net/core, dated October 2026, and it's still filed under napi_disable(9) in the Kernel API Manual 🌸 go forth and disable NAPI responsibly β­πŸŽ€

πŸ“¦ where this page comes from