summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-29 16:37:30 +0200
committerDamjan Marion <dmarion@me.com>2022-03-29 15:53:49 +0000
commit4db618380280df6f0f88b99566dfab5ad2ee85f4 (patch)
tree15acc9054a23fe15b64c838280dbef48f54a616f /src/plugins/dpdk/device/init.c
parentfbc4ad5fd4a48c49c492912fe75e33a2dbb41dab (diff)
dpdk: make log pipe non-blocking on both sides
Type: fix Change-Id: I857403b9d93ee4c17f2dd5ac8e6dafd66260a252 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rw-r--r--src/plugins/dpdk/device/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index eb01b9fe3d1..940c03055ad 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1268,7 +1268,8 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
int log_fds[2] = { 0 };
if (pipe (log_fds) == 0)
{
- if (fcntl (log_fds[1], F_SETFL, O_NONBLOCK) == 0)
+ if (fcntl (log_fds[0], F_SETFL, O_NONBLOCK) == 0 &&
+ fcntl (log_fds[1], F_SETFL, O_NONBLOCK) == 0)
{
FILE *f = fdopen (log_fds[1], "a");
if (f && rte_openlog_stream (f) == 0)