git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal/linux: only call iopl on x86
[dpdk.git]
/
lib
/
librte_eal
/
linuxapp
/
eal
/
eal_interrupts.c
diff --git
a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index
95beb4c
..
a9af396
100644
(file)
--- a/
lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/
lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@
-57,10
+57,8
@@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#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_debug.h>
#include <rte_log.h>
-#include <rte_mempool.h>
#include <rte_pci.h>
#include <rte_malloc.h>
#include <rte_errno.h>
#include <rte_pci.h>
#include <rte_malloc.h>
#include <rte_errno.h>
@@
-887,7
+885,7
@@
rte_eal_intr_init(void)
/* Set thread_name for aid in debugging. */
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN,
"eal-intr-thread");
/* Set thread_name for aid in debugging. */
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN,
"eal-intr-thread");
- ret_1 =
pthread_setname_np
(intr_thread, thread_name);
+ ret_1 =
rte_thread_setname
(intr_thread, thread_name);
if (ret_1 != 0)
RTE_LOG(ERR, EAL,
"Failed to set thread name for interrupt handling\n");
if (ret_1 != 0)
RTE_LOG(ERR, EAL,
"Failed to set thread name for interrupt handling\n");
@@
-901,6
+899,7
@@
eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle)
{
union rte_intr_read_buffer buf;
int bytes_read = 1;
{
union rte_intr_read_buffer buf;
int bytes_read = 1;
+ int nbytes;
switch (intr_handle->type) {
case RTE_INTR_HANDLE_UIO:
switch (intr_handle->type) {
case RTE_INTR_HANDLE_UIO:
@@
-925,15
+924,15
@@
eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle)
* for epoll_wait.
*/
do {
* 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));
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);
RTE_LOG(ERR, EAL, "Read nothing from fd %d\n", fd);
return;
} while (1);