rdma_read_gid_attr_ndev_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rdma_read_gid_attr_ndev_rcu(9) β€” kernel API manual, but make it make sense πŸŽ€

okay so bestie, welcome to the kernel API manual for rdma_read_gid_attr_ndev_rcu(9) ✨ this one's a lil function in the RDMA GID-attribute cinematic universe and honestly? she's giving "small but does a lot" energy. let's get into it 🫢


✨ NAME ✨

rdma_read_gid_attr_ndev_rcu β€” read the GID attribute's netdevice, and that netdevice has got to be in the UP state, no exceptions πŸ’…


🌸 SYNOPSIS 🌸

struct net_device * rdma_read_gid_attr_ndev_rcu (const struct
ib_gid_attr *attr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • attr β€” pointer to the GID attribute πŸŽ€ like, that's the whole input, she's lowkey simple like that.

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• this returns a pointer to the netdevice β€” but only if the netdevice was actually attached to the GID and the netdevice is sitting in the UP state. both boxes checked or we don't vibe, periodt ✨

⚠️ bestie, listen to me: the caller must hold the RCU lock. not optional, not "eh maybe", must. because this API reads the netdev flags, and those flags can literally change while the netdevice migrates to a different net namespace 😭 things be moving, okay?

and if it can't give you the netdevice? it returns ERR_PTR with an error code instead πŸ™ˆ that's your "not today" signal, no cap.


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/infiniband/core/cache.c, plus the whole friend group πŸ’–:


and that's the whole page, bestie!! 🌈 this icon lived at ./drivers/infiniband/core and she was dated October 2026 β€” so go forth, hold that RCU lock, and slay πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from