CREATE_RWQ_IND_TBL(3)

πŸ’– CREATE_RWQ_IND_TBL πŸ’–

okay bestie, pull up a chair, because today we're talking about the Libibverbs Programmer's Manual page for CREATE_RWQ_IND_TBL(3) and honestly? it's giving table energy. receive work queue indirection table energy, specifically. let's get into it πŸ¦‹


✨ NAME ✨

ibv_create_rwq_ind_table, ibv_destroy_rwq_ind_table β€” the two functions that make and unmake a Receive Work Queue Indirection Table (aka the RWQ IND TBL, which is such a mouthful, we're abbreviating fr).


🌸 SYNOPSIS 🌸

#include <infiniband/verbs.h>

struct ibv_rwq_ind_table *ibv_create_rwq_ind_table(struct ibv_context *context,
                                                           struct ibv_rwq_ind_table_init_attr *init_attr);

int ibv_destroy_rwq_ind_table(struct ibv_rwq_ind_table *rwq_ind_table);

πŸŽ€ DESCRIPTION πŸŽ€

so ibv_create_rwq_ind_table() makes a RWQ IND TBL that's tied to the ibv_context you pass in as context. the init_attr argument is a ibv_rwq_ind_table_init_attr struct, and it's defined in <infiniband/verbs.h> like this:

struct ibv_rwq_ind_table_init_attr {
        uint32_t        log_ind_tbl_size;     /* Log, base 2, of Indirection table size */
        struct          ibv_wq **ind_tbl;     /* Each entry is a pointer to Receive Work Queue */
        uint32_t        comp_mask;            /* Identifies valid fields. Use ibv_ind_table_init_attr_mask */
};

periodt. that's the whole shape of it πŸ’…

ibv_create_rwq_ind_table() creates a RWQ IND TBL holding a table of Receive Work Queues. and for what you actually do with the object once it exists, scroll down to NOTES, bestie, i gotchu.

ibv_destroy_rwq_ind_table() destroys the RWQ IND TBL rwq_ind_table. bye bye πŸ‘‹ iconic of it to clean up after itself.


πŸ”₯ RETURN VALUE πŸ”₯

  • ibv_create_rwq_ind_table() hands you back a pointer to the freshly created RWQ IND TBL πŸŽ‰ β€” or NULL if the request fails. (yes, NULL. sad. no table for you.)
  • ibv_destroy_rwq_ind_table() returns 0 on success, or the value of errno on failure β€” and that errno value tells you why it flopped. so read it, don't just stare at it πŸ™ˆ

πŸ’€ NOTES πŸ’€

the object you just created should be used as part of ibv_create_qp_ex() β€” that's how you turn on dispatching of incoming packets based on some RX hash configuration. so like, the table isn't the main character, it's the supporting cast that makes the queue pair pop ✨


πŸ‘‘ SEE ALSO πŸ‘‘


🌈 AUTHORS 🌈

Yishai Hadas <yishaih@mellanox.com> β€” ty for your service 🫢


and that's the whole page, bestie!! this one shipped as part of libibverbs, dated 2016-07-27, and it lives in the manual as CREATE_RWQ_IND_TBL(3). go forth and indirect your receive work queues, you absolute icon πŸ’œβœ¨

πŸ“¦ where this page comes from