Thread (3 messages) 3 messages, 3 authors, 2022-01-21
STALE1642d

[PATCH] eal: log hugepage create errors with filename

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-12-23 19:22:05
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

While debugging running DPDK service in a container, it is
useful to see which file creation failed.  Don't hide this
failure with DEBUG.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/eal/linux/eal_memalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 337f2bc739cf..16b58d861b31 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -308,8 +308,8 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
 		if (fd < 0) {
 			fd = open(path, O_CREAT | O_RDWR, 0600);
 			if (fd < 0) {
-				RTE_LOG(ERR, EAL, "%s(): open failed: %s\n",
-					__func__, strerror(errno));
+				RTE_LOG(ERR, EAL, "%s(): open '%s' failed: %s\n",
+					__func__, path, strerror(errno));
 				return -1;
 			}
 			/* take out a read lock and keep it indefinitely */
@@ -346,8 +346,8 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
 
 			fd = open(path, O_CREAT | O_RDWR, 0600);
 			if (fd < 0) {
-				RTE_LOG(DEBUG, EAL, "%s(): open failed: %s\n",
-					__func__, strerror(errno));
+				RTE_LOG(ERR, EAL, "%s(): open '%s' failed: %s\n",
+					__func__, path, strerror(errno));
 				return -1;
 			}
 			/* take out a read lock */
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help