eal: cosmetic changes
authorIntel <intel.com>
Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 16 Sep 2013 13:30:55 +0000 (15:30 +0200)
Signed-off-by: Intel
lib/librte_eal/common/include/rte_common.h
lib/librte_eal/common/include/rte_launch.h
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c
lib/librte_eal/linuxapp/eal/eal_lcore.c

index eb82a8b..764d1cf 100644 (file)
@@ -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.
index 744d551..be0a902 100644 (file)
@@ -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);
index 07eb7e5..8f61d7c 100644 (file)
@@ -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);
index 7487f34..a733d84 100644 (file)
@@ -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);