mlx5dv_dev...msi_vector(3)

πŸ’– NAME πŸ’–

okay so bestie, this is the mlx5dv_dev...msi_vector(3) page from the mlx5 Programmer’s Manual, and it’s giving two functions with main character energy:

  • 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.

periodt. πŸ’…


πŸ“Ž 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 ✨

So basically: allocate or free an msi vector to be used for creating an EQ. πŸ’–

The allocate API exposes an 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. iconic, honestly. πŸ¦‹


πŸŽ€ 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. slay when it works, 😭 when it doesn’t.

Upon success, mlx5dv_devx_free_msi_vector will return 0; on error, errno will be returned.


πŸ‘‘ AUTHOR πŸ‘‘

Mark Zhang <markzhang@nvidia.com>


xoxo, from the mlx5 source/version and the 2022-01-12 date πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from