netdev_work_cancel(9)
β¨ NAME β¨
netdev_work_cancel β cancel selected work for a netdev π§
okay so quick vibe check first: this whole page lives in the Kernel API Manual bestie, that's the manual we're in, and it's literally all about calling off some of a netdev's pending work. that's it, that's the girl. π
π¦ SYNOPSIS π¦
unsigned long netdev_work_cancel (struct net_device *dev , unsigned long
mask );
πΈ ARGUMENTS πΈ
devβ anet_device. the device in question. the main character, honestly. πmaskβ the events to cancel. like, which ones you're calling off. π
π DESCRIPTION π
so what this does is clear mask from the device's work pending mask. that's the whole move. β¨
and here's the slay part: if there's no work left pending, the device gets dequeued and its ndo_work won't be called. no cap. it's giving "you're done here." π
ngl, the locking situation is a whole mood: no expectations on locking, but also no guarantees provided. so if the caller wants to touchdevafterwards (like, say, call the work that just got canceled π) they have to make suredevdoesn't get freed. that's on you, bestie. protect her. π«Ά
β RETURN β
it returns the subset of mask that was actually pending β so the caller can run those events inline. convenient much? π₯
π SEE ALSO π
- Kernel file
./net/core/netdev_work.cβ go read it, iykyk π¦
and that's the page!! π huge thanks to the source fam over in ./net/core, this edition is dated October 2026, and the manual page is literally called netdev_work_cancel(9) in case you forgot five seconds after reading the title πβ¨
π¦ 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