rdma_read_gids(9)
π rdma_read_gids(9) β like, the Kernel API Manual page, bestie π
okay so this is rdma_read_gids, and it lives in the rdma_read_gids(9) section of the Kernel API Manual β yes that's the manual name, I'm not making it up β¨. Sit down, grab a boba, and let me tell you about the little function that hands you your GIDs.
π NAME π
rdma_read_gids β returns the SGID and DGID that were used for establishing the connection, and honestly? iconic behaviour π
.
so like, the way this works: you can use it after rdma_resolve_addr() on the client side. You can also use it on a new connection on the server side. It's applicable to IB, RoCE, and iWarp β it's giving versatile, fr fr π¦.
big caveat though, don't skip this: if cm_id isn't bound yet to the RDMA device, it doesn't copy any SGID or DGID to the given pointers. Nothing. Nada. Ghosted π.
β¨ SYNOPSIS β¨
void rdma_read_gids (struct rdma_cm_id *cm_id , union ib_gid *sgid ,
union ib_gid *dgid );
that's the whole signature, she's cute, she's small, she does exactly one thing π«Ά
πΈ ARGUMENTS πΈ
cm_idβ-- undescribed --π yeah that's literally what the page says, the docs really said "not me forgetting to describe this one." I'm not gonna invent lore for it, no cap.sgidβ pointer to SGID where the SGID will be returned. It is optional, so if you're not feeling it, pass on it, queen π.dgidβ pointer to DGID where the DGID will be returned. Also optional. Also can be skipped. We love a flexible parameter β¨.
β NOTE β
listen. listen. this API should not be used by any new ULPs or new code. nope. nope. not you. π
If you're a user interested in querying GIDs, you should instead refer to the path record of the rdma_cm_id to query the GIDs. That's the move, that's the vibe, that's the current timeline π.
This API is provided for compatibility for existing users β so it's like that one friend who's still on the old app version. We keep them around, we love them, but don't join them π.
π¦ SEE ALSO π¦
okay this list is LONG and I'm obsessed with her for it β kernel file ./include/rdma/rdma_cm.h plus a whole entourage:
rdma_create_id(9)rdma_destroy_id(9)rdma_restrict_node_type(9)rdma_bind_addr(9)rdma_resolve_addr(9)rdma_resolve_route(9)rdma_resolve_ib_service(9)rdma_create_qp(9)rdma_destroy_qp(9)rdma_init_qp_attr(9)rdma_listen(9)rdma_notify(9)rdma_reject(9)rdma_disconnect(9)rdma_join_multicast(9)rdma_leave_multicast(9)rdma_set_service_type(9)rdma_set_reuseaddr(9)rdma_set_afonly(9)rdma_reject_msg(9)rdma_consumer_reject_data(9)
go read them all, iykyk π§ββοΈ
fr fr reminder bestie: new code? don't touch this one. path record of the rdma_cm_id is the way. periodt. π
and that's the page!! π sign-off time: this came out of ./include/rdma, dated October 2026, and the whole thing is rdma_read_gids(9) β slay, bye, go resolve some addresses responsibly ππ₯
π¦ 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