mlx5dv_devx_create_eq(3)

πŸ’… mlx5dv_devx_create_eq(3) β€” mlx5 Programmer's Manual

okay so bestie, welcome to the mlx5 Programmer's Manual ✨ this page covers two icons: mlx5dv_devx_create_eq and mlx5dv_devx_destroy_eq. one makes an EQ object, one yeets it. that's the whole vibe, let's get into it 🫢


🌸 NAME 🌸

  • mlx5dv_devx_create_eq β€” Create an EQ object πŸ’–
  • mlx5dv_devx_destroy_eq β€” Destroy an EQ object πŸ’€

✨ SYNOPSIS ✨

#include <infiniband/mlx5dv.h>

struct mlx5dv_devx_eq *
mlx5dv_devx_create_eq(struct ibv_context *ibctx, const void *in, size_t inlen,
              void *out, size_t outlen);

int mlx5dv_devx_destroy_eq(struct mlx5dv_devx_eq *eq);

πŸŽ€ DESCRIPTION πŸŽ€

So you wanna Create / Destroy an EQ object, periodt. πŸ’…

When you're creating one, you (the caller) are the main character here β€” you prepare the in/out mailboxes based on the device specification format. like, that's your job, no cap.

For the input mailbox, the caller needs to prepare all the fields except "eqc.log_page_size" and the pas list β€” those two get set by the driver, so don't touch, iykyk πŸ™ˆ.

And the "eqc.intr" field? you should use that from the output of mlx5dv_devx_alloc_msi_vector(). literally, that's where it comes from. ⭐


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ibctx β€” the RDMA device context you're creating the action on. your canvas, your moment. 🎨
  • in β€” a buffer holding the command's input data, provided in a device specification format.
  • inlen β€” the size of the in buffer, in bytes.
  • out β€” a buffer holding the command's output data, according to the device specification format.
  • outlen β€” the size of the out buffer, in bytes.
  • eq β€” the EQ object you wanna work on.

and here's the struct, look at her:

struct mlx5dv_devx_eq {
    void *vaddr;
};
  • vaddr β€” the EQ VA that was allocated in the driver for. 🧚

πŸ’œ NOTES πŸ’œ

⚠️ important bestie: mlx5dv_devx_query_eqn() will not support vectors which are used by mlx5dv_devx_create_eq(). so like, don't even try it. πŸ’€

πŸ”₯ RETURN VALUE πŸ”₯

Upon success, mlx5dv_devx_create_eq will return a new struct mlx5dv_devx_eq. slay. πŸ‘‘ On error, NULL will be returned and errno will be set. 😭

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

🚨 If the error value is EREMOTEIO, outbox.status and outbox.syndrome will contain the command failure details. so check those, fr fr.

🌈 SEE ALSO 🌈


🌸 AUTHOR 🌸

Mark Zhang <markzhang@nvidia.com> β€” icon, legend, the moment. 🫢


okay that's the whole page, you ate that πŸ’…βœ¨ this was mlx5, dated 2022-01-12, brought to you by the mlx5dv_devx_create_eq(3) girlies. go forth and create your EQs bestie πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from