From 99dde4b0e2f504b707ded1105c2f913db01689b9 Mon Sep 17 00:00:00 2001 From: Intel Date: Mon, 3 Jun 2013 00:00:00 +0000 Subject: [PATCH] eal: cosmetic changes Signed-off-by: Intel --- lib/librte_eal/common/include/rte_common.h | 2 +- lib/librte_eal/common/include/rte_launch.h | 2 +- lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 13 ++++++++----- lib/librte_eal/linuxapp/eal/eal_lcore.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index eb82a8baf9..764d1cfd12 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -264,7 +264,7 @@ rte_pause (void) * Searches the input parameter for the least significant set bit * (starting from zero). * If a least significant 1 bit is found, its bit index is returned. - * If the content of the input paramer is zero, then the content of the return + * If the content of the input parameter is zero, then the content of the return * value is undefined. * @param v * input parameter, should not be zero. diff --git a/lib/librte_eal/common/include/rte_launch.h b/lib/librte_eal/common/include/rte_launch.h index 744d55169e..be0a902c7c 100644 --- a/lib/librte_eal/common/include/rte_launch.h +++ b/lib/librte_eal/common/include/rte_launch.h @@ -166,7 +166,7 @@ int rte_eal_wait_lcore(unsigned slave_id); * rte_eal_wait_lcore() for every lcore. The return values are * ignored. * - * After a call to rte_eal_mp_wait_lcores(), the caller can assume + * After a call to rte_eal_mp_wait_lcore(), the caller can assume * that all slave lcores are in a WAIT state. */ void rte_eal_mp_wait_lcore(void); diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c index 07eb7e560f..8f61d7c854 100644 --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c @@ -84,7 +84,8 @@ get_num_hugepages(const char *subdir) return 0; if (num_pages == 0) - RTE_LOG(ERR, EAL, "Error - no free hugepages available!\n"); + RTE_LOG(WARNING, EAL, "No free hugepages reported in %s\n", + subdir); return (int32_t)num_pages; } @@ -284,10 +285,12 @@ eal_hugepage_info_init(void) /* first, check if we have a mountpoint */ if (hpi->hugedir == NULL){ - RTE_LOG(INFO, EAL, "%u hugepages of size %llu reserved, "\ - "but no mounted hugetlbfs found for that size\n", - (unsigned) get_num_hugepages(dirent->d_name), - (unsigned long long)hpi->hugepage_sz); + int32_t num_pages; + if ((num_pages = get_num_hugepages(dirent->d_name)) > 0) + RTE_LOG(INFO, EAL, "%u hugepages of size %llu reserved, "\ + "but no mounted hugetlbfs found for that size\n", + (unsigned)num_pages, + (unsigned long long)hpi->hugepage_sz); } else { /* try to obtain a writelock */ hpi->lock_descriptor = open(hpi->hugedir, O_RDONLY); diff --git a/lib/librte_eal/linuxapp/eal/eal_lcore.c b/lib/librte_eal/linuxapp/eal/eal_lcore.c index 7487f34ef8..a733d84bbf 100644 --- a/lib/librte_eal/linuxapp/eal/eal_lcore.c +++ b/lib/librte_eal/linuxapp/eal/eal_lcore.c @@ -100,7 +100,7 @@ cpu_socket_id(unsigned lcore_id) } closedir(d); if (endptr == NULL || *endptr!='\0' || endptr == e->d_name+prefix_len) { - RTE_LOG(ERR, EAL, "Error reading numa node link " + RTE_LOG(WARNING, EAL, "Cannot read numa node link " "for lcore %u - using physical package id instead\n", lcore_id); -- 2.20.1