dev_get_by_name_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

dev_get_by_name_rcu

okay so bestie, welcome to the Kernel API Manual page for dev_get_by_name_rcu πŸ’… this one is short, but the RCU lock situation is very much the main character. no cap.


🌸 NAME 🌸

dev_get_by_name_rcu β€” find a device by its name πŸŽ€

✨ SYNOPSIS ✨

       struct net_device * dev_get_by_name_rcu (struct net *net , const char
       *name );

πŸŽ€ ARGUMENTS πŸŽ€

  • net β€” the applicable net namespace 🌐
  • name β€” name to find πŸ”Ž

πŸ’– DESCRIPTION πŸ’–

Find an interface by name. If the name is found, a pointer to the device is returned 🫢. If the name is not found, then NULL is returned 😭.

The reference counters are not incremented, so the caller must be careful with locks. The caller must hold RCU lock. like, this is not a drill, bestie β€” locks are the vibe check here πŸ’€.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./net/core/dev.c β€” and the whole squad is here:


xoxo, your kernel bestie 🧚 β€” this page lives under ./net/core, was last vibe-checked in October 2026, and it's giving iconic RCU energy. periodt. πŸ’œ

πŸ“¦ where this page comes from