---
name: "mlx5dv_devx_subscribe_devx_event"
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_subscribe_devx_event"
---

# mlx5dv\_devx\_subscribe\_devx\_event(3)

Subscribe over an event channel for device events. mlx5dv\_devx\_subscribe\_devx\_event\_fd - Subscribe over an event channel for device events to signal eventfd.

## NAME

mlx5dv\_devx\_subscribe\_devx\_event - Subscribe over an event channel for device events.

mlx5dv\_devx\_subscribe\_devx\_event\_fd - Subscribe over an event channel for device events to signal eventfd.

## SYNOPSIS

-

  ```
  #include <infiniband/mlx5dv.h>
  int mlx5dv_devx_subscribe_devx_event(struct mlx5dv_devx_event_channel *dv_event_channel,
                       struct mlx5dv_devx_obj *obj,
                       uint16_t events_sz,
                       uint16_t events_num[],
                       uint64_t cookie)
  int mlx5dv_devx_subscribe_devx_event_fd(struct mlx5dv_devx_event_channel *dv_event_channel,
                      int fd,
                      struct mlx5dv_devx_obj *obj,
                      uint16_t event_num)
  ```

## DESCRIPTION

Subscribe over a DEVX event channel for device events.

## ARGUMENTS

- *dv\_event\_channel*

  Event channel to subscribe over.

- *fd*

  A file descriptor that previously was opened by the eventfd() system call.

- *obj*

  DEVX object that *events\_num* relates to, can be NULL for unaffiliated events.

- *events\_sz*

  Size of the *events\_num* buffer that holds the events to subscribe for.

- *events\_num*

  Holds the required event numbers to subscribe for, numbers are according to the device specification.

- *cookie*

  The value to be returned back when reading the event, can be used as an ID for application use.

## NOTES

When mlx5dv\_devx\_subscribe\_devx\_event\_fd will be used the *fd* will be signaled once an event has occurred.

## SEE ALSO

*[mlx5dv\_open\_device(3)](/mlx5dv_open_device/3.md)*, *[mlx5dv\_devx\_create\_event\_channel(3)](/mlx5dv_devx_create_event_channel/3.md)*, *[mlx5dv\_devx\_get\_event(3)](/mlx5dv_devx_get_event/3.md)*

\#AUTHOR

Yishai Hadas ⟨yishaih@mellanox.com⟩\\c
