Skip to contentSkip to conversation

enic: silence log message

PATCH New Stephen Hemminger 3 participants 6 messages Feb 8, 2015 – Feb 15, 2015 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enic: silence log message

From: Stephen Hemminger <[email protected]>

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

---
 lib/librte_pmd_enic/enic_main.c | 2 --
 1 file changed, 2 deletions(-)
lib/librte_pmd_enic/enic_main.c +0 -2
index 48fdca2..dad8922 100644
@@ -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;
 
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1423416981-5168-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org

#2 lore raw

PATCH 1/1 enic: silence log message

From: Stephen Hemminger <[email protected]>

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

---
 lib/librte_pmd_enic/enic_main.c | 2 --
 1 file changed, 2 deletions(-)
lib/librte_pmd_enic/enic_main.c +0 -2
index 48fdca2..dad8922 100644
@@ -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;
 
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1423416981-5168-2-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org

#4 lore raw
Quoted 16 lines · Stephen Hemminger

From: Stephen Hemminger <[email protected]>

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

---
 lib/librte_pmd_enic/enic_main.c | 2 --
 1 file changed, 2 deletions(-)
lib/librte_pmd_enic/enic_main.c +0 -0
index 48fdca2..dad8922 100644

lib/librte_pmd_enic/enic_main.c int enic_probe(struct enic *enic) · line 1051

Quoted 8 lines
lib/librte_pmd_enic/enic_main.c +0 -2
@@ -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.

Signature · 1 line
David Marchand

A message that is not in the archive (sent off-list or not yet received): CALwxeUt87snj1=fbc4UyV9fbR_aYUN5FmU2v7tF3CBrk4M3OEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Agree it should not use printf.
If you insist on keeping the useless message then it should be log level debug

A message that is not in the archive (sent off-list or not yet received): CAOaVG17Zjw1S+rG3pMh2eGjYGaD6tQw6-4zETU-dW=MpPsmoGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#8 lore raw

Hi Stephen, David,

I agree with you and shall submit this change.

Thanks,
-Sujith

Quoted 3 lines · Stephen Hemminger

Agree it should not use printf.
If you insist on keeping the useless message then it should be log level debug

A message that is not in the archive (sent off-list or not yet received): D1063669.2FCE5%[email protected]

#10 lore raw

Stephen,
Saw your patch. Will take a look.

Thanks,
-Sujith

Quoted 14 lines · Sujith Sankar (ssujith)

Hi Stephen, David,

I agree with you and shall submit this change.

Thanks,
-Sujith

Quoted 3 lines · Stephen Hemminger

Agree it should not use printf.
If you insist on keeping the useless message then it should be log level debug