Skip to contentSkip to conversation

testpmd logging

DISCUSSION Thomas Monjalon 5 participants 5 messages Nov 8, 2022 – Nov 11, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

I see testpmd is doing log with EAL entity. Example:
RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
We could also discuss the log level.

Please can we work on replacing these logs?
We need to choose how to log (printf or registered log entity) and be consistent.
What do you think?

#1 lore raw

+ Lijuan, Owen, Juraj

Quoted 8 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 8, 2022 7:02 AM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]
Subject: testpmd logging

Quoted 7 lines

Hello,

I see testpmd is doing log with EAL entity. Example:
RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
We could also discuss the log level.

Please can we work on replacing these logs?

DTS uses some of the logs from testpmd to validate the results. I am not sure what all logs are used.

Quoted 4 lines

We need to choose how to log (printf or registered log entity) and be consistent.
What do you think?

#2 lore raw
Quoted 18 lines · Honnappa Nagarahalli

+ Lijuan, Owen, Juraj

Quoted 15 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 8, 2022 7:02 AM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]
Subject: testpmd logging

Hello,

I see testpmd is doing log with EAL entity. Example:
RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
We could also discuss the log level.

Please can we work on replacing these logs?

If we want to revisit logging in testpmd, even though I know I'm invoking a case of second system syndrome here, I would love to see some form of structured logging output. Even just writing out records to a CSV file with proper escaping would work great, or doing a json object per log record as a backup. JSON might be easier since libjansson is already in DPDK, and we could disable the json logging flag if libjansson was not present at compile time.

Quoted 2 lines

DTS uses some of the logs from testpmd to validate the results. I am not sure what all logs are used.

The old version of dts (the one with its own repository) is fairly tightly bound to testpmd's logging.

Quoted 4 lines

We need to choose how to log (printf or registered log entity) and be

Quoted 2 lines

consistent.
What do you think?

Registered log entries are much better in my opinion since they provide a more machine-friendly format and DTS has to parse testpmd output.

#3 lore raw
Quoted 38 lines · On Tue, 8 Nov 2022 11:24:53 -0500 Owen Hilyard <[email protected]> wrote:
Quoted 18 lines · Honnappa Nagarahalli

+ Lijuan, Owen, Juraj

Quoted 15 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 8, 2022 7:02 AM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]
Subject: testpmd logging

Hello,

I see testpmd is doing log with EAL entity. Example:
RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
We could also discuss the log level.

Please can we work on replacing these logs?

If we want to revisit logging in testpmd, even though I know I'm invoking a case of second system syndrome here, I would love to see some form of structured logging output. Even just writing out records to a CSV file with proper escaping would work great, or doing a json object per log record as a backup. JSON might be easier since libjansson is already in DPDK, and we could disable the json logging flag if libjansson was not present at compile time.

Quoted 2 lines

DTS uses some of the logs from testpmd to validate the results. I am not sure what all logs are used.

The old version of dts (the one with its own repository) is fairly tightly bound to testpmd's logging.

Quoted 7 lines
Quoted 4 lines

We need to choose how to log (printf or registered log entity) and be

Quoted 2 lines

consistent.
What do you think?

Registered log entries are much better in my opinion since they provide a more machine-friendly format and DTS has to parse testpmd output.

My thoughts.
1. testpmd should use its own log level, not EAL
2. testpmd could easily have an option "--json" to format output in JSON
3. testpmd is a mess some logs use RTE_LOG() some go to stdout, some to stderr.

#4 lore raw
Quoted 60 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: 2022年11月9日 0:40
To: Owen Hilyard <[email protected]>
Cc: Honnappa Nagarahalli <[email protected]>; [email protected]; Singh, Aman Deep <[email protected]>; Zhang, Yuying <[email protected]>; [email protected]; [email protected]; Tu, Lijuan <[email protected]>; Juraj Linkeš <[email protected]>; nd <[email protected]>
Subject: Re: testpmd logging

Quoted 44 lines · On Tue, 8 Nov 2022 11:24:53 -0500 Owen Hilyard <[email protected]> wrote:
Quoted 18 lines · Honnappa Nagarahalli

+ Lijuan, Owen, Juraj

Quoted 15 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, November 8, 2022 7:02 AM
To: Aman Singh <[email protected]>; Yuying Zhang <[email protected]>
Cc: [email protected]; [email protected]
Subject: testpmd logging

Hello,

I see testpmd is doing log with EAL entity. Example:
RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
We could also discuss the log level.

Please can we work on replacing these logs?

If we want to revisit logging in testpmd, even though I know I'm invoking a case of second system syndrome here, I would love to see some form of structured logging output. Even just writing out records to a CSV file with proper escaping would work great, or doing a json object per log record as a backup. JSON might be easier since libjansson is already in DPDK, and we could disable the json logging flag if libjansson was not present at compile time.

Quoted 2 lines

DTS uses some of the logs from testpmd to validate the results. I am not sure what all logs are used.

The old version of dts (the one with its own repository) is fairly tightly bound to testpmd's logging.

Quoted 5 lines

We need to choose how to log (printf or registered log entity) and be

Quoted 2 lines

consistent.
What do you think?

Quoted 8 lines
Quoted 2 lines

Registered log entries are much better in my opinion since they provide a more machine-friendly format and DTS has to parse testpmd output.

My thoughts.
1. testpmd should use its own log level, not EAL
2. testpmd could easily have an option "--json" to format output in JSON
3. testpmd is a mess some logs use RTE_LOG() some go to stdout, some to
stderr.

The same as Hemminger. testpmd should refine log functions then.