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

# mlx5dv\_devx\_alloc\_msi\_vector(3)

Allocate an msi vector to be used for creating an EQ. mlx5dv\_devx\_free\_msi\_vector - Release an msi vector.

## NAME

mlx5dv\_devx\_alloc\_msi\_vector - Allocate an msi vector to be used for creating an EQ.

mlx5dv\_devx\_free\_msi\_vector - Release an msi vector.

## SYNOPSIS

-

  ```
  #include <infiniband/mlx5dv.h>
  struct mlx5dv_devx_msi_vector *
  mlx5dv_devx_alloc_msi_vector(struct ibv_context *ibctx);
  int mlx5dv_devx_free_msi_vector(struct mlx5dv_devx_msi_vector *msi);
  ```

## DESCRIPTION

Allocate or free an msi vector to be used for creating an EQ.

The allocate API exposes a mlx5dv\_devx\_msi\_vector object, which includes an msi vector and a fd. The vector can be used as the “eqc.intr” field when creating an EQ, while the fd (created as non-blocking) can be polled to see once there is some data on that EQ.

## ARGUMENTS

- *ibctx*

  RDMA device context to create the action on.

- *msi*

  The msi vector object to work on.

### msi\_vector

-

  ```
  struct mlx5dv_devx_msi_vector {
      int vector;
      int fd;
  };
  ```

- *vector*

  The vector to be used when creating the EQ over the device specification.

- *fd*

  The FD that will be used for polling.

## RETURN VALUE

Upon success *mlx5dv\_devx\_alloc\_msi\_vector* will return a new *struct mlx5dv\_devx\_msi\_vector*; On error NULL will be returned and errno will be set.

Upon success *mlx5dv\_devx\_free\_msi\_vector* will return 0, on error errno will be returned.

## AUTHOR

Mark Zhang ⟨markzhang@nvidia.com⟩\\c
