EFADV_QUERY_MR(3)
π EFADV_QUERY_MR(3) β like, the EFA Direct Verbs manual, bestie π¦
okay so this is page EFADV_QUERY_MR(3) from the EFA Direct Verbs Manual, and it's genuinely so good β it's all about peeking at the device-specific tea on a Memory Region. no cap, let's get into it β¨
πΈ NAME πΈ
efadv_query_mr β query EFA specific Memory Region attributes π
β¨ SYNOPSIS β¨
#include <infiniband/efadv.h>
int efadv_query_mr(struct ibv_mr *ibvmr, struct efadv_mr_attr *attr, uint32_t inlen);
like, that's the whole vibe. three args, one int back. slay π
π DESCRIPTION π
so efadv_query_mr() queries device-specific Memory Region attributes. it's giving "let me find out what this MR is actually doing on the hardware" π₯
compatibility is handled using the comp_mask and inlen fields β that's the whole mechanism, fr fr.
struct efadv_mr_attr {
uint64_t comp_mask;
uint16_t ic_id_validity;
uint16_t recv_ic_id;
uint16_t rdma_read_ic_id;
uint16_t rdma_recv_ic_id;
};
now let's break down every field, one by one, because we do not skip β¨
inlenβ In (input! you set it): the size ofstruct efadv_mr_attr.comp_maskβ the compatibility mask. iconic, necessary, does exactly what it says.ic_id_validityβ the validity mask for the interconnect id fields. it tells you which of the id fields below actually have valid values in them:EFADV_MR_ATTR_VALIDITY_RECV_IC_IDβ meansrecv_ic_idhas a valid value βοΈEFADV_MR_ATTR_VALIDITY_RDMA_READ_IC_IDβ meansrdma_read_ic_idhas a valid value βοΈEFADV_MR_ATTR_VALIDITY_RDMA_RECV_IC_IDβ meansrdma_recv_ic_idhas a valid value βοΈ
recv_ic_idβ the physical interconnect the device uses to reach the MR for receive operation π«Άrdma_read_ic_idβ the physical interconnect the device uses to reach the MR for RDMA read operation πrdma_recv_ic_idβ the physical interconnect the device uses to reach the MR for RDMA write receive π
three different interconnects, three different operations, all queried in one go β main character energy honestly π
π RETURN VALUE π
efadv_query_mr() returns 0 on success, or the value of errno on failure (which indicates the failure reason). so like, zero is the good ending, anything else means go read errno and find out what went wrong π
π¦ SEE ALSO π¦
efadv(7)β the big one, go read it next, iykyk π«
β NOTES β
- compatibility mask (
comp_mask) is an out field and currently has no values. so it's out-only for now and there's literally nothing in it β not me telling you to check it, because there's nothing to check π
πΈ AUTHORS πΈ
Michael Margolin <mrgolin@amazon.com> β thank you for your service, king ππ
and that's the whole page bestie, you ate that π«Ά this was efa, dated 2023-11-13, and it's the EFADV_QUERY_MR(3) page β go forth and query those MRs, periodt π
β¨
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms