src/dpdk/drivers/net/failsafe/failsafe_intr.c
static int
fs_rx_event_proxy_routine(void *data)
{
	struct fs_priv *priv;
	struct rxq *rxq;
	struct rte_epoll_event *events;
	uint64_t u64;
	int i, n;
	int rc = 0;

	u64 = 1;
	priv = data;
	events = priv->rxp.evec;
	n = rte_epoll_wait(priv->rxp.efd, events, NUM_RX_PROXIES, -1);
	for (i = 0; i < n; i++) {
		rxq = events[i].epdata.data;
		if (rxq->enable_events && rxq->event_fd != -1) {
			if (write(rxq->event_fd, &u64, sizeof(u64)) !=
			    sizeof(u64)) {
				ERROR("Failed to proxy Rx event to socket %d",
				       rxq->event_fd);
				rc = -EIO;
			}
		}
	}
	return rc;
}
/**
 * Install failsafe Rx event proxy service.
 * The Rx event proxy is the service that listens to Rx events from the
 * subdevices and triggers failsafe Rx events accordingly.
 *
 * @param priv
 *   Pointer to failsafe private structure.
 * @return
 *   0 on success, negative errno value otherwise.
 */
Install failsafe Rx event proxy service.
The Rx event proxy is the service that listens to Rx events from the
subdevices and triggers failsafe Rx events accordingly.

@param priv
Pointer to failsafe private structure.
@return
0 on success, negative errno value otherwise.
Install failsafe Rx event proxy service . The Rx event proxy is the service that listens to Rx events from the subdevices and triggers failsafe Rx events accordingly . @param priv Pointer to failsafe private structure . @return 0 on success negative errno value otherwise .
static int
fs_rx_event_proxy_routine(void *data)
{
	struct fs_priv *priv;
	struct rxq *rxq;
	struct rte_epoll_event *events;
	uint64_t u64;
	int i, n;
	int rc = 0;
	u64 = 1;
	priv = data;
	events = priv->rxp.evec;
	n = rte_epoll_wait(priv->rxp.efd, events, NUM_RX_PROXIES, -1);
	for (i = 0; i < n; i++) {
		rxq = events[i].epdata.data;
		if (rxq->enable_events && rxq->event_fd != -1) {
			if (write(rxq->event_fd, &u64, sizeof(u64)) !=
			    sizeof(u64)) {
				ERROR("Failed to proxy Rx event to socket %d",
				       rxq->event_fd);
				rc = -EIO;
			}
		}
	}
	return rc;
}
static int fs_rx_event_proxy_routine ( void * data ) { struct fs_priv * priv ; struct rxq * rxq ; struct rte_epoll_event * events ; uint64_t u64 ; int i , n ; int rc = 0 ; u64 = 1 ; priv = data ; events = priv -> rxp . evec ; n = rte_epoll_wait ( priv -> rxp . efd , events , NUM_RX_PROXIES , -1 ) ; for ( i = 0 ; i < n ; i ++ ) { rxq = events [ i ] . epdata . data ; if ( rxq -> enable_events && rxq -> event_fd != -1 ) { if ( write ( rxq -> event_fd , & u64 , sizeof ( u64 ) ) != sizeof ( u64 ) ) { ERROR ( " " , rxq -> event_fd ) ; rc = - EIO ; } } } return rc ; }
Install failsafe Rx event proxy service.
Install failsafe Rx event proxy service .