eal: log hugepage create errors with filename

Message ID 20211223192158.143591-1-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series eal: log hugepage create errors with filename |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing warning Testing issues
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Stephen Hemminger Dec. 23, 2021, 7:21 p.m. UTC
  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(-)
  

Comments

Bruce Richardson Jan. 7, 2022, 11:53 a.m. UTC | #1
On Thu, Dec 23, 2021 at 11:21:58AM -0800, Stephen Hemminger wrote:
> 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(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Should we consider this a bugfix for backporting? Not printing the failing
path seems an omission that should be fixed generally.
  
Thomas Monjalon Jan. 21, 2022, 2:26 p.m. UTC | #2
07/01/2022 12:53, Bruce Richardson:
> On Thu, Dec 23, 2021 at 11:21:58AM -0800, Stephen Hemminger wrote:
> > 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(-)
> > 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> 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.
  

Patch

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 */