[v2] bus/pci: set boot-up log prints to absolute minimum

Message ID 20200504132653.3668706-1-jerinj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] bus/pci: set boot-up log prints to absolute minimum |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Jerin Jacob Kollanukkaran May 4, 2020, 1:26 p.m. UTC
  From: Jerin Jacob <jerinj@marvell.com>

Some machines may have a lot of PCI devices and all of them are
not bound to DPDK. In such case the logs from EAL creates a lot of
clutter on boot-up, typically one needs to scroll the screen to
find other issues in boot-up.

This patch changes the following to reduce the clutter in
the default boot-up logs.

- Change the log-level of PCI probes to `debug`
- Introduce new driver probe as `info` log-level for the successful probe.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
v2:
- Introduce new driver probe as `info` log-level for the successful
  probe(Thomas)

 drivers/bus/pci/pci_common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--
2.26.2
  

Comments

Jerin Jacob May 7, 2020, 1:54 p.m. UTC | #1
On Mon, May 4, 2020 at 6:56 PM <jerinj@marvell.com> wrote:
>
> From: Jerin Jacob <jerinj@marvell.com>
>
> Some machines may have a lot of PCI devices and all of them are
> not bound to DPDK. In such case the logs from EAL creates a lot of
> clutter on boot-up, typically one needs to scroll the screen to
> find other issues in boot-up.
>
> This patch changes the following to reduce the clutter in
> the default boot-up logs.
>
> - Change the log-level of PCI probes to `debug`
> - Introduce new driver probe as `info` log-level for the successful probe.
>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
> v2:
> - Introduce new driver probe as `info` log-level for the successful
>   probe(Thomas)


Thomas,
Could you review and merge this for RC2.
I have addressed the comments. Limited the default prints to successful probe().


>
>  drivers/bus/pci/pci_common.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
> index 3f5542076..6585a4b47 100644
> --- a/drivers/bus/pci/pci_common.c
> +++ b/drivers/bus/pci/pci_common.c
> @@ -136,7 +136,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
>                 /* Match of device and driver failed */
>                 return 1;
>
> -       RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
> +       RTE_LOG(DEBUG, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
>                         loc->domain, loc->bus, loc->devid, loc->function,
>                         dev->device.numa_node);
>
> @@ -161,7 +161,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
>                 return -EEXIST;
>         }
>
> -       RTE_LOG(INFO, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
> +       RTE_LOG(DEBUG, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
>                 dev->id.device_id, dr->driver.name);
>
>         /*
> @@ -195,6 +195,10 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
>                 }
>         }
>
> +       RTE_LOG(INFO, EAL, "Probe PCI driver: %s (%x:%x) device: "PCI_PRI_FMT" (socket %i)\n",
> +                       dr->driver.name, dev->id.vendor_id, dev->id.device_id,
> +                       loc->domain, loc->bus, loc->devid, loc->function,
> +                       dev->device.numa_node);
>         /* call the driver probe() function */
>         ret = dr->probe(dr, dev);
>         if (already_probed)
> --
> 2.26.2
>
  
Thomas Monjalon May 7, 2020, 3:36 p.m. UTC | #2
07/05/2020 15:54, Jerin Jacob:
> On Mon, May 4, 2020 at 6:56 PM <jerinj@marvell.com> wrote:
> >
> > From: Jerin Jacob <jerinj@marvell.com>
> >
> > Some machines may have a lot of PCI devices and all of them are
> > not bound to DPDK. In such case the logs from EAL creates a lot of
> > clutter on boot-up, typically one needs to scroll the screen to
> > find other issues in boot-up.
> >
> > This patch changes the following to reduce the clutter in
> > the default boot-up logs.
> >
> > - Change the log-level of PCI probes to `debug`
> > - Introduce new driver probe as `info` log-level for the successful probe.
> >
> > Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> > ---
> > v2:
> > - Introduce new driver probe as `info` log-level for the successful
> >   probe(Thomas)
> 
> 
> Thomas,
> Could you review and merge this for RC2.
> I have addressed the comments. Limited the default prints to successful probe().

Yes it's in my list for -rc2.
  
Thomas Monjalon May 11, 2020, 2:39 p.m. UTC | #3
07/05/2020 17:36, Thomas Monjalon:
> 07/05/2020 15:54, Jerin Jacob:
> > On Mon, May 4, 2020 at 6:56 PM <jerinj@marvell.com> wrote:
> > >
> > > From: Jerin Jacob <jerinj@marvell.com>
> > >
> > > Some machines may have a lot of PCI devices and all of them are
> > > not bound to DPDK. In such case the logs from EAL creates a lot of
> > > clutter on boot-up, typically one needs to scroll the screen to
> > > find other issues in boot-up.
> > >
> > > This patch changes the following to reduce the clutter in
> > > the default boot-up logs.
> > >
> > > - Change the log-level of PCI probes to `debug`
> > > - Introduce new driver probe as `info` log-level for the successful probe.
> > >
> > > Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> > > ---
> > > v2:
> > > - Introduce new driver probe as `info` log-level for the successful
> > >   probe(Thomas)
> > 
> > 
> > Thomas,
> > Could you review and merge this for RC2.
> > I have addressed the comments. Limited the default prints to successful probe().
> 
> Yes it's in my list for -rc2.

Applied, thanks
  

Patch

diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 3f5542076..6585a4b47 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -136,7 +136,7 @@  rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 		/* Match of device and driver failed */
 		return 1;

-	RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
+	RTE_LOG(DEBUG, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
 			loc->domain, loc->bus, loc->devid, loc->function,
 			dev->device.numa_node);

@@ -161,7 +161,7 @@  rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 		return -EEXIST;
 	}

-	RTE_LOG(INFO, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
+	RTE_LOG(DEBUG, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
 		dev->id.device_id, dr->driver.name);

 	/*
@@ -195,6 +195,10 @@  rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 		}
 	}

+	RTE_LOG(INFO, EAL, "Probe PCI driver: %s (%x:%x) device: "PCI_PRI_FMT" (socket %i)\n",
+			dr->driver.name, dev->id.vendor_id, dev->id.device_id,
+			loc->domain, loc->bus, loc->devid, loc->function,
+			dev->device.numa_node);
 	/* call the driver probe() function */
 	ret = dr->probe(dr, dev);
 	if (already_probed)