ib_sa_service_rec_get(9)
β¨ NAME β¨
okay so this is ib_sa_service_rec_get(9) from the Kernel API Manual, and the whole assignment is literally Start a Service get query π
β¨. Thatβs the name, thatβs the vibe, weβre moving.
πΈ SYNOPSIS πΈ
the signature is giving long boi, but every type and comma stays exactly where it belongs:
int ib_sa_service_rec_get (struct ib_sa_client *client , struct
ib_device *device , u32 port_num , struct sa_service_rec *rec ,
ib_sa_comp_mask comp_mask , unsigned long timeout_ms , gfp_t gfp_mask ,
void (*callback)(int status, struct sa_service_rec *resp, unsigned int
num_services, void *context) , void *context , struct ib_sa_query
**sa_query );
π ARGUMENTS π
clientβ SA client πdeviceβ device to send query on π¦port_numβ port number to send query on πrecβ Service Record to send in query πcomp_maskβ component mask to send in query π§timeout_msβ time to wait for response β³gfp_maskβ GFP mask to use for internal allocations π±callbackβ function called when query completes, times out or is canceled πcontextβ opaque user context passed to callback π«Άsa_queryβ query context, used to cancel query π
π¦ DESCRIPTION π¦
okay so what this actually does: send a Service Record Get query to the SA to look up a path π. The callback function will be called when the query completes (or fails), and status is the tea: 0 for a successful response, -EINTR if the query is canceled, -ETIMEDOUT if the query timed out, or -EIO if an error occurred sending the query. And bestie, important: the resp parameter of the callback is only valid if status is 0 β no cap π§’.
If the return value of ib_sa_service_rec_get is negative, it is an error code. Otherwise it is a query ID that can be used to cancel the query πβ¨.
π SEE ALSO π
Kernel file ./drivers/infiniband/core/sa_query.c and these besties: ib_sa_cancel_query(9), ib_init_ah_attr_from_path(9), ib_sa_path_rec_get(9) π
mwah π β source/version: ./drivers/infiniband/core, dated October 2026. periodt. π«Ά
π¦ 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