summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2016-06-17 14:48:16 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-06-17 18:04:22 +0200
commit3901ed99c2f82d3e979bb1bea001d61898241829 (patch)
tree304c430258648575d61b6ffa80f338a6e0389d09 /examples
parent92fed91965785beccad406ee6982567be4444ffb (diff)
downloaddpdk-3901ed99c2f82d3e979bb1bea001d61898241829.zip
dpdk-3901ed99c2f82d3e979bb1bea001d61898241829.tar.gz
dpdk-3901ed99c2f82d3e979bb1bea001d61898241829.tar.xz
eal: fix thread naming on FreeBSD
rte_thread_setname was a macro defined only for Linux. The function rte_thread_setname() can now be used on FreeBSD as well on Linux. It is required to build librte_pdump. The macro was 0 for old glibc. The function is now returning -1. The related logs are decreased from error to debug level because it is not an important failure, just a debug inconvenience. Fixes: 278f945402c5 ("pdump: add new library for packet capture") Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: David Marchand <david.marchand@6wind.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/tep_termination/main.c2
-rw-r--r--examples/vhost/main.c2
-rw-r--r--examples/vhost_xen/main.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index b8297dd..aa67a6b 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -1246,7 +1246,7 @@ main(int argc, char *argv[])
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "print-stats");
ret = rte_thread_setname(tid, thread_name);
if (ret != 0)
- RTE_LOG(ERR, VHOST_CONFIG, "Cannot set print-stats name\n");
+ RTE_LOG(DEBUG, VHOST_CONFIG, "Cannot set print-stats name\n");
}
/* Launch all data cores. */
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 665886e..f849571 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1474,7 +1474,7 @@ main(int argc, char *argv[])
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "print-stats");
ret = rte_thread_setname(tid, thread_name);
if (ret != 0)
- RTE_LOG(ERR, VHOST_CONFIG,
+ RTE_LOG(DEBUG, VHOST_CONFIG,
"Cannot set print-stats name\n");
}
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
index 2b04c95..2e40357 100644
--- a/examples/vhost_xen/main.c
+++ b/examples/vhost_xen/main.c
@@ -1494,7 +1494,7 @@ main(int argc, char *argv[])
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "print-xen-stats");
ret = rte_thread_setname(tid, thread_name);
if (ret != 0)
- RTE_LOG(ERR, VHOST_CONFIG,
+ RTE_LOG(DEBUG, VHOST_CONFIG,
"Cannot set print-stats name\n");
}