netdev_has_u..._dev_all_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– netdev_has_upper_dev_all_rcu(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes, the Kernel API Manual, that's the manual name, we're in the big leagues now πŸŽ€. Today's main character is a lil boolean function that answers one very specific question about your network devices, and honestly? it ate. let's get into it πŸ¦‹


✨ NAME ✨

netdev_has_upper_dev_all_rcu β€” Check if device is linked to an upper device πŸ’…


🌸 SYNOPSIS 🌸

bool netdev_has_upper_dev_all_rcu (struct net_device *dev , struct net_device *upper_dev );

like literally just hand it two devices and it'll tell you yes or no, no cap πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device. that's it, that's the whole vibe. it's your starting point, the main character of this little story πŸ‘‘
  • upper_dev β€” the upper device you're checking for. the one we're like "hmm, is this one linked?" about πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole point: you wanna find out if a device is linked to the specified upper device, and it returns true in case it is. Simple, clean, iconic ✨.

But wait, there's a plot twist β€” it checks the entire upper device chain, not just the immediate one. so it's giving "we went through the whole friend group to find this person" energy πŸ’€. very thorough of it, honestly obsessed.

⚠️ and bestie, listen to me: the caller must hold rcu lock. that's not a suggestion, that's a requirement. hold the lock, or don't come crying to me πŸ˜­πŸ”’

πŸ’œ SEE ALSO πŸ’œ

the squad πŸ’… β€” all of these live in the kernel file ./net/core/dev.c:

iykyk 😌 the whole dev.c friend group showed up fr fr 🌈


πŸ’« sign-off πŸ’«

and that's the tea, bestie πŸ“ this lil page comes to you from the <./net/core> corner of the kernel and it's dated October 2026 πŸ“… β€” so like, future vibes, but make it timeless πŸ’œ. go forth, hold that rcu lock, and slay βœ¨πŸ§šβ€β™€οΈπŸ’…

πŸ“¦ where this page comes from