IBV_QUERY_SRQ(3)

πŸ’– IBV_QUERY_SRQ πŸ’–

okay bestie, welcome to ibv_query_srq β€” a page straight out of the Libibverbs Programmer's Manual, section 3. this one's short, sweet, and honestly kinda iconic for it. let's get into it 🫢


✨ NAME ✨

ibv_query_srq β€” get the attributes of a shared receive queue (SRQ) πŸ’…


🌸 SYNOPSIS 🌸

#include <infiniband/verbs.h>

int ibv_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr);

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does ibv_query_srq() actually do, you ask? it gets the attributes of the SRQ srq and hands them right back to you through the pointer srq_attr. no cap, that's the whole job. πŸ‘‘

the argument srq_attr is an ibv_srq_attr struct, as defined in <infiniband/verbs.h>. and here's what that lil guy looks like:

struct ibv_srq_attr {
        uint32_t                max_wr;         /* maximum number of outstanding work requests (WRs) in the SRQ */
        uint32_t                max_sge;        /* maximum number of scatter elements per WR */
        uint32_t                srq_limit;      /* the limit value of the SRQ */
};

look at those three fields, so demure, so mindful:

  • max_wr β€” the maximum number of outstanding work requests (WRs) in the SRQ πŸ”₯
  • max_sge β€” the maximum number of scatter elements per WR ✨
  • srq_limit β€” the limit value of the SRQ πŸŽ€

πŸ’« RETURN VALUE πŸ’«

ibv_query_srq() returns 0 on success, or the value of errno on failure (which, yes, indicates the failure reason β€” she's communicative like that πŸ’β€β™€οΈ).


πŸ‘‘ NOTES πŸ‘‘

okay this one actually matters, so pay attention bestie πŸ‘€

if the value returned for srq_limit is 0, then the SRQ limit reached ("low watermark") event is not (or no longer) armed, and no asynchronous events will be generated until the event is rearmed. it's giving "asleep at the wheel" 😴 so if you were waiting on a signal, she's not coming until you rearm. periodt.


🌈 SEE ALSO 🌈

the whole SRQ friend group, fr fr. iykyk 🧚


πŸ’œ AUTHORS πŸ’œ

Dotan Barak <dotanba@gmail.com> β€” thank you for your service, king 🫑


and that's the page!! mwah πŸ’– brought to you by libibverbs, dated 2006-10-31 β€” yes she's an elder but she still ate, and she's still serving IBV_QUERY_SRQ(3) energy every single day. bye bestie, go query something πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from