eal: prefix telemetry initialization message

Message ID 20210308222339.819494-1-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series eal: prefix telemetry initialization message |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Thomas Monjalon March 8, 2021, 10:23 p.m. UTC
  If the telemetry library initialization has some issue,
the error message is returned in a string
(to avoid circular dependency with EAL log system).

In order to make clear where the message comes from,
a prefix is added.
Before:   EAL: message
After:    EAL: telemetry: message

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/freebsd/eal.c | 2 +-
 lib/librte_eal/linux/eal.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Bruce Richardson March 9, 2021, 10:59 a.m. UTC | #1
On Mon, Mar 08, 2021 at 11:23:38PM +0100, Thomas Monjalon wrote:
> If the telemetry library initialization has some issue,
> the error message is returned in a string
> (to avoid circular dependency with EAL log system).
> 
> In order to make clear where the message comes from,
> a prefix is added.
> Before:   EAL: message
> After:    EAL: telemetry: message
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Bruce Richardson March 9, 2021, 2:03 p.m. UTC | #2
On Tue, Mar 09, 2021 at 10:59:52AM +0000, Bruce Richardson wrote:
> On Mon, Mar 08, 2021 at 11:23:38PM +0100, Thomas Monjalon wrote:
> > If the telemetry library initialization has some issue,
> > the error message is returned in a string
> > (to avoid circular dependency with EAL log system).
> > 
> > In order to make clear where the message comes from,
> > a prefix is added.
> > Before:   EAL: message
> > After:    EAL: telemetry: message
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

By the way, I have a nearly completed patch for the telemetry library to
switch it to doing its own logging instead of passing back a string. It
does require a function pointer to rte_log to be passed to the init call,
but thereafter things are pretty normal in it and simplifies things. I'll
send it on as soon as it is ready.

/Bruce
  
Thomas Monjalon March 25, 2021, 2:32 p.m. UTC | #3
09/03/2021 15:03, Bruce Richardson:
> On Tue, Mar 09, 2021 at 10:59:52AM +0000, Bruce Richardson wrote:
> > On Mon, Mar 08, 2021 at 11:23:38PM +0100, Thomas Monjalon wrote:
> > > If the telemetry library initialization has some issue,
> > > the error message is returned in a string
> > > (to avoid circular dependency with EAL log system).
> > > 
> > > In order to make clear where the message comes from,
> > > a prefix is added.
> > > Before:   EAL: message
> > > After:    EAL: telemetry: message
> > > 
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > ---
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> By the way, I have a nearly completed patch for the telemetry library to
> switch it to doing its own logging instead of passing back a string. It
> does require a function pointer to rte_log to be passed to the init call,
> but thereafter things are pretty normal in it and simplifies things. I'll
> send it on as soon as it is ready.

Thank you for the rework.
This patch is now classified as "Superseded".
  

Patch

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index e2cdad5283..afbbb1c523 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -949,7 +949,7 @@  rte_eal_init(int argc, char **argv)
 			return -1;
 		}
 		if (error_str != NULL)
-			RTE_LOG(NOTICE, EAL, "%s\n", error_str);
+			RTE_LOG(NOTICE, EAL, "telemetry: %s\n", error_str);
 	}
 
 	eal_mcfg_complete();
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 6c34ac8903..bc966150a5 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1322,7 +1322,7 @@  rte_eal_init(int argc, char **argv)
 			return -1;
 		}
 		if (error_str != NULL)
-			RTE_LOG(NOTICE, EAL, "%s\n", error_str);
+			RTE_LOG(NOTICE, EAL, "telemetry: %s\n", error_str);
 	}
 
 	eal_mcfg_complete();