]> git.droids-corp.org - dpdk.git/commitdiff
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 eb82a8baf92a4d128a9eedf1ee6c5331ff2de3e3..764d1cfd122f1acf3ea68f1a65872e5d835a0287 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 744d55169e77d97e11368fca973f57fc5eb070e7..be0a902c7c7196e29ac171aa0cc2e8c1773b597f 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 07eb7e560f222d242bcad1377c345a5be14567e6..8f61d7c8542e42e538bbd17f67add60b21da2a89 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 7487f34ef838a290db9f3c9ca2ec753c49c35ca2..a733d84bbfc23f9c8acd3c358c163f0351d9fe90 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);