IBV_QUERY_RT_VALUES_EX(3)

πŸ’– ibv_query_rt_values_ex β€” bestie edition πŸ’–

okay so this is a page from the Libibverbs Programmer's Manual, and the function we're stanning today is ibv_query_rt_values_ex. it's giving "let me peek at your device's real time values" energy. let's go πŸ¦‹


✨ NAME ✨

ibv_query_rt_values_ex β€” query an RDMA device for some real time values

no cap, that's the whole job. we ask, the device tells us. iconic.


✨ SYNOPSIS ✨

#include <infiniband/verbs.h>

int ibv_query_rt_values_ex(struct ibv_context *context,
                           struct ibv_values_ex *values);

✨ DESCRIPTION ✨

ibv_query_rt_values_ex() returns certain real time values of a device context. and babes, the manpage says the argument attr is a pointer to an ibv_device_attr_ex struct, as defined in <infiniband/verbs.h>. yes, attr. in a page whose synopsis calls it values. i'm just the messenger, i don't make the rules πŸ’€ anyway, here's the struct, exactly as written:

struct ibv_values_ex {
        uint32_t             comp_mask;    /* Compatibility mask that defines the query/queried fields [in/out] */
        struct timespec      raw_clock;    /* HW raw clock */
};

and here's the mask enum, because of course there's a mask enum, there's always a mask enum:

enum ibv_values_mask {
        IBV_VALUES_MASK_RAW_CLOCK = 1 << 0, /* HW raw clock */
};

that's it. that's the whole shape of it. πŸŽ€


✨ RETURN VALUE ✨

ibv_query_rt_values_ex() returns 0 on success, or the value of errno on failure (which indicates the failure reason).

so like β€” zero means slay, anything else means go read your errno. periodt.


✨ NOTES ✨

this extension verb only calls the provider, fr fr. the provider has to query this value somehow, and mark the queried values in the comp_mask field. so the provider is doing the heavy lifting here, not us. we just show up and ask nicely 🫢


✨ SEE ALSO ✨

the whole query-verse, basically. go read them all, i'll wait πŸ’…


✨ AUTHORS ✨

  • Matan Barak <matanb@mellanox.com>
  • Yishai Hadas <yishaih@mellanox.com>

heads up bestie: this extension verb only calls the provider β€” the provider has to actually query this value and mark what it queried in the comp_mask field. so if the mask looks empty, the provider didn't mark anything. that's on them, not you 🌸

and that's the whole page, we ate and left no crumbs πŸ‘‘

signing off: this little beauty comes from libibverbs, dated 2016-2-20, and it lives at the top of the page as IBV_QUERY...VALUES_EX(3) in the Libibverbs Programmer's Manual. mwah πŸ’‹

πŸ“¦ where this page comes from