diff mbox

[dpdk-dev] enic: silence log message

Message ID 1423416981-5168-2-git-send-email-stephen@networkplumber.org (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Stephen Hemminger Feb. 8, 2015, 5:36 p.m. UTC
From: Stephen Hemminger <shemming@brocade.com>

Silence is normal. drivers should speak only when spoken to and not
be chatty.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_pmd_enic/enic_main.c | 2 --
 1 file changed, 2 deletions(-)

Comments

David Marchand Feb. 9, 2015, 12:21 p.m. UTC | #1
On Sun, Feb 8, 2015 at 6:36 PM, Stephen Hemminger <
stephen@networkplumber.org> wrote:

> From: Stephen Hemminger <shemming@brocade.com>
>
> Silence is normal. drivers should speak only when spoken to and not
> be chatty.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  lib/librte_pmd_enic/enic_main.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/lib/librte_pmd_enic/enic_main.c
> b/lib/librte_pmd_enic/enic_main.c
> index 48fdca2..dad8922 100644
> --- a/lib/librte_pmd_enic/enic_main.c
> +++ b/lib/librte_pmd_enic/enic_main.c
> @@ -1046,8 +1046,6 @@ int enic_probe(struct enic *enic)
>         struct rte_pci_device *pdev = enic->pdev;
>         int err = -1;
>
> -       dev_info(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);
> -
>         enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
>         enic->bar0.len = pdev->mem_resource[0].len;
>

NAK.

The main problem is that enic pmd is using printf to write logs.
So the pmd should be fixed so that dev_* macros use RTE_LOG.

Silence is good when it is the default behaviour.
But I prefer we can change this at runtime, rather than strip the log
messages, especially for init.
Stephen Hemminger Feb. 9, 2015, 4:11 p.m. UTC | #2
Agree it should not use printf.
If you insist on keeping the useless message then it should be log level
debug
Sujith Sankar Feb. 15, 2015, 6:13 a.m. UTC | #3
Hi Stephen, David,

I agree with you and shall submit this change.

Thanks,
-Sujith

On 09/02/15 9:41 pm, "Stephen Hemminger" <stephen@networkplumber.org>
wrote:

>Agree it should not use printf.
>If you insist on keeping the useless message then it should be log level
>debug
Sujith Sankar Feb. 15, 2015, 6:29 a.m. UTC | #4
Stephen,
Saw your patch. Will take a look.

Thanks,
-Sujith

On 15/02/15 11:43 am, "Sujith Sankar (ssujith)" <ssujith@cisco.com> wrote:

>Hi Stephen, David,
>
>I agree with you and shall submit this change.
>
>Thanks,
>-Sujith
>
>On 09/02/15 9:41 pm, "Stephen Hemminger" <stephen@networkplumber.org>
>wrote:
>
>>Agree it should not use printf.
>>If you insist on keeping the useless message then it should be log level
>>debug
>
diff mbox

Patch

diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c
index 48fdca2..dad8922 100644
--- a/lib/librte_pmd_enic/enic_main.c
+++ b/lib/librte_pmd_enic/enic_main.c
@@ -1046,8 +1046,6 @@  int enic_probe(struct enic *enic)
 	struct rte_pci_device *pdev = enic->pdev;
 	int err = -1;
 
-	dev_info(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION);
-
 	enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
 	enic->bar0.len = pdev->mem_resource[0].len;