mlx5dv_devx_crea...roy_event_channel(3)

okay bestie, buckle up πŸ’– you've stumbled into section 3 of the mlx5dv_devx_crea...roy_event_channel(3) manual, and honestly? it's giving "short but mighty." let's get into it 🫢

✨ NAME ✨

mlx5dv_devx_create_event_channel β€” make an event channel, the kind you use for DEVX asynchronous events πŸ‘‘

mlx5dv_devx_destroy_event_channel β€” and this one destroys a DEVX event channel πŸ’€

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <infiniband/mlx5dv.h>

struct mlx5dv_devx_event_channel {
    int fd;
};

struct mlx5dv_devx_event_channel *
mlx5dv_devx_create_event_channel(struct ibv_context *context,
                                 enum mlx5dv_devx_create_event_channel_flags flags)

void mlx5dv_devx_destroy_event_channel(struct mlx5dv_devx_event_channel *event_channel)

🌸 DESCRIPTION 🌸

so basically you're creating (or destroying, no judgment) a channel to be used for DEVX asynchronous events. that's the whole vibe ✨

the create verb, like, exposes an mlx5dv_devx_event_channel object β€” and that object is your girl for reading asynchronous DEVX events. it lets an application subscribe to get device events, and once an event actually happens, you just read it right off this object. no cap, that's it πŸ”₯

πŸŽ€ ARGUMENTS πŸŽ€

  • context β€” the RDMA device context you want to create the channel on. like, which device are we doing this on, bestie πŸ’…
  • flags β€” MLX5DV_DEVX_CREATE_EVENT_CHANNEL_FLAGS_OMIT_EV_DATA: omit the event data on this channel πŸ™ˆ

⭐ RETURN VALUE ⭐

upon success, mlx5dv_devx_create_event_channel returns a brand new struct mlx5dv_devx_event_channel object. slay πŸ’– on error, NULL gets returned and errno will be set β€” so if you see a NULL, check your errno, that's where the tea is at β˜•

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Yishai Hadas <yishaih@mellanox.com>


and that's a wrap, diva 🧚 this little page came from the mlx5dv_devx_crea...roy_event_channel(3) manual β€” source/version vibes and all β€” hope you understood it fr fr, mwah πŸ’œ

πŸ“¦ where this page comes from