#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_ring.h>
#include <rte_debug.h>
#include <rte_log.h>
-#include <rte_mempool.h>
#include <rte_pci.h>
#include <rte_malloc.h>
#include <rte_errno.h>
{
union rte_intr_read_buffer buf;
int bytes_read = 1;
+ int nbytes;
switch (intr_handle->type) {
case RTE_INTR_HANDLE_UIO:
* for epoll_wait.
*/
do {
- bytes_read = read(fd, &buf, bytes_read);
- if (bytes_read < 0) {
+ nbytes = read(fd, &buf, bytes_read);
+ if (nbytes < 0) {
if (errno == EINTR || errno == EWOULDBLOCK ||
errno == EAGAIN)
continue;
RTE_LOG(ERR, EAL,
"Error reading from fd %d: %s\n",
fd, strerror(errno));
- } else if (bytes_read == 0)
+ } else if (nbytes == 0)
RTE_LOG(ERR, EAL, "Read nothing from fd %d\n", fd);
return;
} while (1);