EFADV_QUERY_AH(3)

πŸ’… EFADV_QUERY_AH(3) β€” like, the EFA Direct Verbs manual, bestie πŸ¦‹

okay so welcome to the EFA Direct Verbs Manual, section 3, page EFADV_QUERY_AH β€” yes the whole title, we're doing this properly ✨


🌸 NAME 🌸

efadv_query_ah β€” it queries the EFA-specific Address Handle attributes. that's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

#include <infiniband/efadv.h>

int efadv_query_ah(struct ibv_ah *ibvah, struct efadv_ah_attr *attr,
           uint32_t inlen);

like, three args, one include, zero drama 🫢


πŸ’– DESCRIPTION πŸ’–

efadv_query_ah() goes and asks the device for its device-specific Address Handle attributes. lowkey iconic of it, honestly πŸ‘‘

so how do we not break everything when the struct changes? compatibility is handled using the comp_mask and inlen fields β€” that's the whole trick, no cap πŸ’…

struct efadv_ah_attr {
    uint64_t comp_mask;
    uint16_t ahn;
    uint8_t reserved[6];
};

ngl this struct is serving exactly what it needs to serve:

  • inlen β€” In: the size of struct efadv_ah_attr. just tell it how big your struct is, bestie πŸ“
  • comp_mask β€” the compatibility mask. it's the ✨vibe check✨ for which fields you're using.
  • ahn β€” the device's Address Handle number. literally the number. that's the field. πŸŽ€

πŸ”₯ RETURN VALUE πŸ”₯

efadv_query_ah() returns 0 on success β€” slay πŸ’– β€” or the value of errno on failure (which indicates the failure reason, so read it, don't just ignore it 😭).


🌈 SEE ALSO 🌈

go read that one too, iykyk πŸ¦‹


⭐ NOTES ⭐

  • the compatibility mask (comp_mask) is an out field and currently has no values. so like, it's out here being out 🫢

πŸ‘‘ AUTHORS πŸ‘‘

Gal Pressman <galpress@amazon.com> β€” wrote it, we stan πŸ’œ


fr fr do not mess with the struct layout, the inlen field is load-bearing πŸ’€

and that's the page!! brought to you by efa, dated 2019-05-19, filed under EFADV_QUERY_AH(3) β€” mwah, bestie, go query some address handles πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from