[v7,16/19] event/dlb2: use dedicated logtype

Message ID 20240203041230.285599-17-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Replace uses of RTE_LOGTYPE_PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Feb. 3, 2024, 4:11 a.m. UTC
  Driver was using RTE_LOGTYPE_PMD when it had its own logtype.
Fixes: 5433956d5185 ("event/dlb2: add eventdev probe")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/event/dlb2/dlb2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Comments

Sevincer, Abdullah Feb. 5, 2024, 7:16 p.m. UTC | #1
>+			DLB2_LOG_INFO("Ignoring unsupported parameters when creating device '%s'",
				      name);

Hi Stephen can you modify above like this:

DLB2_LOG_INFO(": Ignoring unsupported parameters when creating device '%s'\n",
name);

It looks better this way the output will be like this after this modification:

dlb2_parse_params: Ignoring unsupported parameters when creating device 'ea:00.0'
  
Stephen Hemminger Feb. 5, 2024, 10:04 p.m. UTC | #2
On Mon, 5 Feb 2024 19:16:15 +0000
"Sevincer, Abdullah" <abdullah.sevincer@intel.com> wrote:

> >+			DLB2_LOG_INFO("Ignoring unsupported parameters when creating device '%s'",  
> 				      name);
> 
> Hi Stephen can you modify above like this:
> 
> DLB2_LOG_INFO(": Ignoring unsupported parameters when creating device '%s'\n",
> name);
> 
> It looks better this way the output will be like this after this modification:
> 
> dlb2_parse_params: Ignoring unsupported parameters when creating device 'ea:00.0'

I don't understand why you would say that.
The message already will get a single newline and your change would add a second one.
Log messages are not supposed to be double spaced, it confuses syslog.

If you want to change the overall format of log messages and how it displays the
function name, that is a different change. And would be done in the macro, DLB2_LOG_IMPL.
The focus of this patch set is using existing format, if you want to change that
please address it in another patch later.
  
Sevincer, Abdullah Feb. 6, 2024, 12:51 a.m. UTC | #3
>+I don't understand why you would say that.
>+The message already will get a single newline and your change would add a second one.
>+Log messages are not supposed to be double spaced, it confuses syslog.

>+If you want to change the overall format of log messages and how it displays the function name, that is a different change. And would be done in the macro, DLB2_LOG_IMPL.
>+The focus of this patch set is using existing format, if you want to change that please address it in another patch later.

No need for new line, I copied wrong debug message, apologies it would be like this

DLB2_LOG_INFO(": Ignoring unsupported parameters when creating device '%s'",
				      name);

Note: Gage and Timothy is not with Intel now. So, not including them in the CC.
  

Patch

diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 050ace0904b4..c26f2219d40c 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4741,9 +4741,8 @@  dlb2_parse_params(const char *params,
 		struct rte_kvargs *kvlist = rte_kvargs_parse(params, args);
 
 		if (kvlist == NULL) {
-			RTE_LOG(INFO, PMD,
-				"Ignoring unsupported parameters when creating device '%s'\n",
-				name);
+			DLB2_LOG_INFO("Ignoring unsupported parameters when creating device '%s'",
+				      name);
 		} else {
 			int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
 						     set_numa_node,