---
name: "manadv_init_obj"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/manadv_init_obj"
---

# manadv\_init\_obj(3)

Initialize mana direct verbs object from ibv\_xxx structures

## NAME

manadv\_init\_obj - Initialize mana direct verbs object from ibv\_xxx structures

## SYNOPSIS”

-

  ```
  #include <infiniband/manadv.h>
  int manadv_init_obj(struct manadv_obj *obj, uint64_t obj_type);
  ```

## DESCRIPTION

manadv\_init\_obj() This function will initialize manadv\_xxx structs based on supplied type. The information for initialization is taken from ibv\_xx structs supplied as part of input.

## ARGUMENTS

- *obj*

  The manadv\_xxx structs be to returned.

-

  ```
  struct manadv_qp {
      void        *sq_buf;
      uint32_t    sq_count;
      uint32_t    sq_size;
      uint32_t    sq_id;
      uint32_t    tx_vp_offset;
      void        *db_page;
  };
  struct manadv_cq {
      void        *buf;
      uint32_t    count;
      uint32_t    cq_id;
  };
  struct manadv_rwq {
      void        *buf;
      uint32_t    count;
      uint32_t    size;
      uint32_t    wq_id;
      void        *db_page;
  };
  struct manadv_pd {
      uint32_t    pdn;
  };
  struct manadv_obj {
      struct {
          struct ibv_qp       *in;
          struct manadv_qp    *out;
      } qp;
      struct {
          struct ibv_cq       *in;
          struct manadv_cq    *out;
      } cq;
      struct {
          struct ibv_wq       *in;
          struct manadv_rwq   *out;
      } rwq;
      struct {
          struct ibv_pd       *in;
          struct manadv_pd    *out;
      } pd;
  };
  ```

- *obj\_type*

  The types of the manadv\_xxx structs to be returned.

-

  ```
  enum manadv_obj_type {
      MANADV_OBJ_QP   = 1 << 0,
      MANADV_OBJ_CQ   = 1 << 1,
      MANADV_OBJ_RWQ  = 1 << 2,
      MANADV_OBJ_PD   = 1 << 3,
  };
  ```

## RETURN VALUE

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

## AUTHORS

Long Li ⟨longli@microsoft.com⟩\\c
