Skip to contentSkip to conversation

eal: log hugepage create errors with filename

PATCH Applied Stephen Hemminger 3 participants 3 messages Dec 23, 2021 – Jan 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: log hugepage create errors with filename

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

---
 lib/eal/linux/eal_memalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
lib/eal/linux/eal_memalloc.c +4 -4
index 337f2bc739cf..16b58d861b31 100644
@@ -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 */
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Stephen Hemminger

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

---
 lib/eal/linux/eal_memalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Should we consider this a bugfix for backporting? Not printing the failing path seems an omission that should be fixed generally.

#2 lore raw

07/01/2022 12:53, Bruce Richardson:

Quoted 10 lines · Stephen Hemminger
Quoted 9 lines

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

---
 lib/eal/linux/eal_memalloc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Quoted 4 lines

Should we consider this a bugfix for backporting? Not printing the failing path seems an omission that should be fixed generally.

Yes adding Cc stable

Applied, thanks.