rdma_read_gid_attr_ndev_rcu(9)
π 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 π:
free_gid_work(9)del_gid(9)add_modify_gid(9)rdma_find_gid_by_port(9)rdma_find_gid_by_filter(9)rdma_query_gid(9)rdma_read_gid_hw_context(9)rdma_find_gid(9)rdma_get_gid_attr(9)rdma_query_gid_table(9)rdma_put_gid_attr(9)rdma_hold_gid_attr(9)rdma_read_gid_l2_fields(9)ib_dispatch_event(9)
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
- 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