src/dpdk/drivers/net/mlx5/mlx5_devx.c
static int
mlx5_rx_devx_get_event(struct mlx5_rxq_obj *rxq_obj)
{
#ifdef HAVE_IBV_DEVX_EVENT
	union {
		struct mlx5dv_devx_async_event_hdr event_resp;
		uint8_t buf[sizeof(struct mlx5dv_devx_async_event_hdr) + 128];
	} out;
	int ret = mlx5_glue->devx_get_event(rxq_obj->devx_channel,
					    &out.event_resp,
					    sizeof(out.buf));

	if (ret < 0) {
		rte_errno = errno;
		return -rte_errno;
	}
	if (out.event_resp.cookie != (uint64_t)(uintptr_t)rxq_obj->cq_obj.cq) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	return 0;
#else
	(void)rxq_obj;
	rte_errno = ENOTSUP;
	return -rte_errno;
#endif /* HAVE_IBV_DEVX_EVENT */
}
/**
 * Get event for an Rx DevX queue object.
 *
 * @param rxq_obj
 *   DevX Rx queue object.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
Get event for an Rx DevX queue object.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
Get event for an Rx DevX queue object . @return 0 on success a negative errno value otherwise and rte_errno is set .
static int
mlx5_rx_devx_get_event(struct mlx5_rxq_obj *rxq_obj)
{
#ifdef HAVE_IBV_DEVX_EVENT
	union {
		struct mlx5dv_devx_async_event_hdr event_resp;
		uint8_t buf[sizeof(struct mlx5dv_devx_async_event_hdr) + 128];
	} out;
	int ret = mlx5_glue->devx_get_event(rxq_obj->devx_channel,
					    &out.event_resp,
					    sizeof(out.buf));
	if (ret < 0) {
		rte_errno = errno;
		return -rte_errno;
	}
	if (out.event_resp.cookie != (uint64_t)(uintptr_t)rxq_obj->cq_obj.cq) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	return 0;
#else
	(void)rxq_obj;
	rte_errno = ENOTSUP;
	return -rte_errno;
#endif 
}
static int mlx5_rx_devx_get_event ( struct mlx5_rxq_obj * rxq_obj ) { #ifdef HAVE_IBV_DEVX_EVENT union { struct mlx5dv_devx_async_event_hdr event_resp ; uint8_t buf [ sizeof ( struct mlx5dv_devx_async_event_hdr ) + 128 ] ; } out ; int ret = mlx5_glue -> devx_get_event ( rxq_obj -> devx_channel , & out . event_resp , sizeof ( out . buf ) ) ; if ( ret < 0 ) { rte_errno = errno ; return - rte_errno ; } if ( out . event_resp . cookie != ( uint64_t ) ( uintptr_t ) rxq_obj -> cq_obj . cq ) { rte_errno = EINVAL ; return - rte_errno ; } return 0 ; #else ( void ) rxq_obj ; rte_errno = ENOTSUP ; return - rte_errno ; #endif }
Get event for an Rx DevX queue object.
Get event for an Rx DevX queue object .
/* HAVE_IBV_DEVX_EVENT */