EFADV_QUERY_DEVICE(3)

✨ EFADV_QUERY_DEVICE(3) ✨

okay bestie, welcome to the EFA Direct Verbs Manual page for efadv_query_device β€” it’s literally giving β€œtell me everything about this EFA device” energy πŸ’…

🌸 NAME 🌸

efadv_query_device β€” query device capabilities 🫢

✨ SYNOPSIS ✨

              #include <infiniband/efadv.h>

              int efadv_query_device(struct ibv_context *ibvctx,
                             struct efadv_device_attr *attr,
                             uint32_t inlen);

πŸ’– DESCRIPTION πŸ’–

efadv_query_device() queries EFA device specific attributes. Compatibility is handled using the comp_mask and inlen fields β€” that’s the compatibility combo, no cap ✨

The struct is literally this, character for character:

              struct efadv_device_attr {
                  uint64_t comp_mask;
                  uint32_t max_sq_wr;
                  uint32_t max_rq_wr;
                  uint16_t max_sq_sge;
                  uint16_t max_rq_sge;
                  uint16_t inline_buf_size;
                  uint8_t reserved[2];
                  uint32_t device_caps;
                  uint32_t max_rdma_size;
              };
  • inlen β€” In: size of struct efadv_device_attr. This one goes in, bestie πŸ’Œ
  • comp_mask β€” compatibility mask. The vibe-check field πŸŽ€
  • max_sq_wr β€” maximum Send Queue (SQ) Work Requests (WRs). That’s the send-side WR ceiling πŸ”₯
  • max_rq_wr β€” maximum Receive Queue (RQ) Work Requests (WRs). The receive-side WR ceiling 🌸
  • max_sq_sge β€” maximum Send Queue (SQ) Scatter Gather Elements (SGEs) ✨
  • max_rq_sge β€” maximum Receive Queue (RQ) Scatter Gather Elements (SGEs) ✨
  • inline_buf_size β€” maximum inline buffer size πŸŽ€
  • device_caps β€” bitmask of device capabilities:
    • EFADV_DEVICE_ATTR_CAPS_RDMA_READ: RDMA read is supported. πŸ‘‘
    • EFADV_DEVICE_ATTR_CAPS_RNR_RETRY: RNR retry is supported for SRD QPs. πŸ¦‹
    • EFADV_DEVICE_ATTR_CAPS_CQ_WITH_SGID: Reading source address (SGID) from receive completion descriptors is supported. Valid only for unknown AH. πŸ’…
    • EFADV_DEVICE_ATTR_CAPS_RDMA_WRITE: RDMA write is supported 🫢
    • EFADV_DEVICE_ATTR_CAPS_UNSOLICITED_WRITE_RECV: Indicates the device has support for creating QPs that can receive unsolicited RDMA write with immediate. RQ with this feature enabled will not consume any work requests in order to receive RDMA write with immediate and a WC generated for such receive will be marked as unsolicited. 😭
    • EFADV_DEVICE_ATTR_CAPS_CQ_WITH_EXT_MEM_DMABUF: Indicates that creating CQs with external memory buffers by passing dmabuf is supported. 🌈
  • max_rdma_size β€” maximum RDMA transfer size in bytes. πŸ“

πŸŽ€ RETURN VALUE πŸŽ€

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

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ‘‘ NOTES πŸ‘‘

  • Compatibility mask (comp_mask) is an out field and currently has no values. Periodt πŸ’…

πŸ’œ AUTHORS πŸ’œ

  • Gal Pressman <galpress@amazon.com> 🫢

okay that’s the whole page, bestie β€” the source/version is efa, dated 2019-04-22, and the manual title is EFADV_QUERY_DEVICE(3). mwah πŸ’‹

πŸ“¦ where this page comes from