DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: dev@dpdk.org, thomas@monjalon.net, stephen@networkplumber.org
Subject: Re: [PATCH v3 1/3] drivers: replace printf with log macros
Date: Wed, 3 Jul 2024 12:41:08 +0200	[thread overview]
Message-ID: <CAJFAV8wJ-ScvROaGz5gPou9V2Lrjx6Tg7_VX_VfsMNM=LwZ86A@mail.gmail.com> (raw)
In-Reply-To: <20240702130856.3927348-1-hemant.agrawal@nxp.com>

Hello Hemant,

On Tue, Jul 2, 2024 at 3:09 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:

[snip]

> diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
> index 0fa70c978f..fb9ac9cb30 100644
> --- a/drivers/crypto/caam_jr/caam_jr.c
> +++ b/drivers/crypto/caam_jr/caam_jr.c
> @@ -461,7 +461,7 @@ caam_jr_prep_cdb(struct caam_jr_session *ses)
>         }
>
>  #if CAAM_JR_DBG
> -       SEC_DUMP_DESC(cdb->sh_desc);
> +       SEC_DUMP_DESC(cdb->sh_desc, stdout);
>  #endif

This hunk should go to next patch.

>
>         cdb->sh_hdr.hi.field.idlen = shared_desc_len;

[snip]

> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
> index 935a4f2ada..bcd19f31fb 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -282,9 +282,9 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
>                                         dpaa_interrupt_handler,
>                                         (void *)dev);
>                                 if (ret == EINVAL)
> -                                       printf("Failed to enable interrupt: Not Supported\n");
> +                                       DPAA_PMD_ERR("Failed to enable interrupt: Not Supported\n");
>                                 else
> -                                       printf("Failed to enable interrupt\n");
> +                                       DPAA_PMD_ERR("Failed to enable interrupt\n");

DPAA_PMD_ERR appends a \n, so \n should be removed here.

There are double \n in this driver prior to this patch, can you fix them too?
It is probably worth checking other NXP drivers on this topic.


>                         }
>                         dev->data->dev_conf.intr_conf.lsc = 0;
>                         dev->data->dev_flags &= ~RTE_ETH_DEV_INTR_LSC;
> @@ -340,7 +340,7 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
>                         dpaa_update_link_speed(__fif->node_name, speed, duplex);
>                 } else {
>                         /* Manual autoneg - custom advertisement speed. */
> -                       printf("Custom Advertisement speeds not supported\n");
> +                       DPAA_PMD_ERR("Custom Advertisement speeds not supported\n");

Idem.


>                 }
>         }
>

[snip]

> diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
> index ce4f3d6c85..c2579d65ee 100644
> --- a/drivers/net/dpaa/dpaa_rxtx.c
> +++ b/drivers/net/dpaa/dpaa_rxtx.c
> @@ -103,7 +103,7 @@ static void dpaa_display_frame_info(const struct qm_fd *fd,
>         for (ii = 0; ii < fd->length20; ii++) {
>                 DISPLAY_PRINT("%02x ", ptr[ii]);
>                 if (((ii + 1) % 16) == 0)
> -                       printf("\n");
> +                       DISPLAY_PRINT("\n");
>         }
>         DISPLAY_PRINT("\n");
>  }

Indeed it is better to call this macro, but this macro is calling printf.
I am ok with the change as this is under a debug build cflag, but I
would prefer this debug code goes through rte_log in the future.


-- 
David Marchand


  parent reply	other threads:[~2024-07-03 10:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 10:29 [PATCH 1/2] " Hemant Agrawal
2023-02-15 10:29 ` [PATCH 2/2] drivers: replace printf with fprintf for debug functions Hemant Agrawal
2023-02-15 15:16   ` Thomas Monjalon
2023-02-16  9:27     ` Hemant Agrawal
2024-07-02  9:31       ` David Marchand
2024-07-02  9:59         ` Hemant Agrawal
2023-02-15 17:17   ` Stephen Hemminger
2024-07-02 10:40 ` [PATCH v2 1/2] drivers: replace printf with log macros Hemant Agrawal
2024-07-02 10:40   ` [PATCH v2 2/2] drivers: replace printf with fprintf for debug functions Hemant Agrawal
2024-07-02 15:11     ` Stephen Hemminger
2024-07-02 17:26       ` Hemant Agrawal
2024-07-02 12:15   ` [PATCH v2 1/2] drivers: replace printf with log macros David Marchand
2024-07-02 13:08   ` [PATCH v3 1/3] " Hemant Agrawal
2024-07-02 13:08     ` [PATCH v3 2/3] bus/dpaa: remove double newline Hemant Agrawal
2024-07-02 13:08     ` [PATCH v3 3/3] drivers: replace printf with fprintf for debug functions Hemant Agrawal
2024-07-03 10:41     ` David Marchand [this message]
2024-07-03 12:02       ` [PATCH v3 1/3] drivers: replace printf with log macros Hemant Agrawal
2024-07-03 12:11         ` David Marchand
2024-07-03 12:16     ` [PATCH v4 " Hemant Agrawal
2024-07-03 12:16       ` [PATCH v4 2/3] drivers: dpaa: remove double newline Hemant Agrawal
2024-07-03 12:16       ` [PATCH v4 3/3] drivers: replace printf with fprintf for debug functions Hemant Agrawal
2024-07-03 14:54       ` [PATCH v4 1/3] drivers: replace printf with log macros David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8wJ-ScvROaGz5gPou9V2Lrjx6Tg7_VX_VfsMNM=LwZ86A@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).