src/dpdk/drivers/net/failsafe/failsafe_intr.c
static int
fs_rx_event_proxy_install(struct fs_priv *priv)
{
	int rc = 0;

	/*
	 * Create the epoll fd and event vector for the proxy service to
	 * wait on for Rx events generated by the subdevices.
	 */
	priv->rxp.efd = fs_epoll_create1(0);
	if (priv->rxp.efd < 0) {
		rte_errno = errno;
		ERROR("Failed to create epoll,"
		      " Rx interrupts will not be supported");
		return -rte_errno;
	}
	priv->rxp.evec = calloc(NUM_RX_PROXIES, sizeof(*priv->rxp.evec));
	if (priv->rxp.evec == NULL) {
		ERROR("Failed to allocate memory for event vectors,"
		      " Rx interrupts will not be supported");
		rc = -ENOMEM;
		goto error;
	}
	rc = fs_rx_event_proxy_service_install(priv);
	if (rc < 0)
		goto error;
	return 0;
error:
	if (priv->rxp.efd >= 0) {
		close(priv->rxp.efd);
		priv->rxp.efd = -1;
	}
	if (priv->rxp.evec != NULL) {
		free(priv->rxp.evec);
		priv->rxp.evec = NULL;
	}
	rte_errno = -rc;
	return rc;
}
/**
 * Install failsafe Rx event proxy subsystem.
 * This is the way the failsafe PMD generates Rx events on behalf of its
 * subdevices.
 *
 * @param priv
 *   Pointer to failsafe private structure.
 * @return
 *   0 on success, negative errno value otherwise and rte_errno is set.
 */
Install failsafe Rx event proxy subsystem.
This is the way the failsafe PMD generates Rx events on behalf of its
subdevices.

@param priv
Pointer to failsafe private structure.
@return
0 on success, negative errno value otherwise and rte_errno is set.
Install failsafe Rx event proxy subsystem . This is the way the failsafe PMD generates Rx events on behalf of its subdevices . @param priv Pointer to failsafe private structure . @return 0 on success negative errno value otherwise and rte_errno is set .
static int
fs_rx_event_proxy_install(struct fs_priv *priv)
{
	int rc = 0;
	priv->rxp.efd = fs_epoll_create1(0);
	if (priv->rxp.efd < 0) {
		rte_errno = errno;
		ERROR("Failed to create epoll,"
		      " Rx interrupts will not be supported");
		return -rte_errno;
	}
	priv->rxp.evec = calloc(NUM_RX_PROXIES, sizeof(*priv->rxp.evec));
	if (priv->rxp.evec == NULL) {
		ERROR("Failed to allocate memory for event vectors,"
		      " Rx interrupts will not be supported");
		rc = -ENOMEM;
		goto error;
	}
	rc = fs_rx_event_proxy_service_install(priv);
	if (rc < 0)
		goto error;
	return 0;
error:
	if (priv->rxp.efd >= 0) {
		close(priv->rxp.efd);
		priv->rxp.efd = -1;
	}
	if (priv->rxp.evec != NULL) {
		free(priv->rxp.evec);
		priv->rxp.evec = NULL;
	}
	rte_errno = -rc;
	return rc;
}
static int fs_rx_event_proxy_install ( struct fs_priv * priv ) { int rc = 0 ; priv -> rxp . efd = fs_epoll_create1 ( 0 ) ; if ( priv -> rxp . efd < 0 ) { rte_errno = errno ; ERROR ( " " " " ) ; return - rte_errno ; } priv -> rxp . evec = calloc ( NUM_RX_PROXIES , sizeof ( * priv -> rxp . evec ) ) ; if ( priv -> rxp . evec == NULL ) { ERROR ( " " " " ) ; rc = - ENOMEM ; goto error ; } rc = fs_rx_event_proxy_service_install ( priv ) ; if ( rc < 0 ) goto error ; return 0 ; error : if ( priv -> rxp . efd >= 0 ) { close ( priv -> rxp . efd ) ; priv -> rxp . efd = -1 ; } if ( priv -> rxp . evec != NULL ) { free ( priv -> rxp . evec ) ; priv -> rxp . evec = NULL ; } rte_errno = - rc ; return rc ; }
Install failsafe Rx event proxy subsystem.
Install failsafe Rx event proxy subsystem .
/*
	 * Create the epoll fd and event vector for the proxy service to
	 * wait on for Rx events generated by the subdevices.
	 */