dma/ioat: remove printf within ioat driver

Message ID 20230203163514.621178-1-conor.walsh@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series dma/ioat: remove printf within ioat driver |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance fail Performance Testing issues
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Conor Walsh Feb. 3, 2023, 4:35 p.m. UTC
  rte_log should be used instead of printf within the drivers this patch
changes a printf within the ioat dma driver's start function to an rte log.
The printfs within ioat's dump function will be retained.

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
 drivers/dma/ioat/ioat_dmadev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson Feb. 3, 2023, 5:07 p.m. UTC | #1
On Fri, Feb 03, 2023 at 04:35:14PM +0000, Conor Walsh wrote:
> rte_log should be used instead of printf within the drivers this patch
> changes a printf within the ioat dma driver's start function to an rte log.
> The printfs within ioat's dump function will be retained.
> 
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> ---

One little nit below, but with that fixed

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

>  drivers/dma/ioat/ioat_dmadev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
> index 5906eb45aa..3fe50ea4a4 100644
> --- a/drivers/dma/ioat/ioat_dmadev.c
> +++ b/drivers/dma/ioat/ioat_dmadev.c
> @@ -146,9 +146,9 @@ ioat_dev_start(struct rte_dma_dev *dev)
>  	/* Prime the status register to be set to the last element. */
>  	ioat->status = ioat->ring_addr + ((ioat->qcfg.nb_desc - 1) * DESC_SZ);
>  
> -	printf("IOAT.status: %s [0x%"PRIx64"]\n",
> -			chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
> -			ioat->status);
> +	IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n",
> +		       chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
> +		       ioat->status);
>  

This whitespace change should not be needed, and we use only tabs for
indent, not spaces. This should be a one-line change.

>  	if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_HALTED) {
>  		IOAT_PMD_WARN("Device HALTED on start, attempting to recover\n");
> -- 
> 2.25.1
>
  
Conor Walsh Feb. 7, 2023, 10:47 a.m. UTC | #2
> On Fri, Feb 03, 2023 at 04:35:14PM +0000, Conor Walsh wrote:
> > rte_log should be used instead of printf within the drivers this patch
> > changes a printf within the ioat dma driver's start function to an rte log.
> > The printfs within ioat's dump function will be retained.
> >
> > Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> > ---
> 
> One little nit below, but with that fixed
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Thanks for the ack!

> 
> >  drivers/dma/ioat/ioat_dmadev.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/dma/ioat/ioat_dmadev.c
> b/drivers/dma/ioat/ioat_dmadev.c
> > index 5906eb45aa..3fe50ea4a4 100644
> > --- a/drivers/dma/ioat/ioat_dmadev.c
> > +++ b/drivers/dma/ioat/ioat_dmadev.c
> > @@ -146,9 +146,9 @@ ioat_dev_start(struct rte_dma_dev *dev)
> >  	/* Prime the status register to be set to the last element. */
> >  	ioat->status = ioat->ring_addr + ((ioat->qcfg.nb_desc - 1) *
> DESC_SZ);
> >
> > -	printf("IOAT.status: %s [0x%"PRIx64"]\n",
> > -			chansts_readable[ioat->status &
> IOAT_CHANSTS_STATUS],
> > -			ioat->status);
> > +	IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n",
> > +		       chansts_readable[ioat->status &
> IOAT_CHANSTS_STATUS],
> > +		       ioat->status);
> >
> 
> This whitespace change should not be needed, and we use only tabs for
> indent, not spaces. This should be a one-line change.

I will send a v2 with only a single line change.

Thanks,
Conor.

> 
> >  	if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) ==
> IOAT_CHANSTS_HALTED) {
> >  		IOAT_PMD_WARN("Device HALTED on start, attempting to
> recover\n");
> > --
> > 2.25.1
> >
  

Patch

diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 5906eb45aa..3fe50ea4a4 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -146,9 +146,9 @@  ioat_dev_start(struct rte_dma_dev *dev)
 	/* Prime the status register to be set to the last element. */
 	ioat->status = ioat->ring_addr + ((ioat->qcfg.nb_desc - 1) * DESC_SZ);
 
-	printf("IOAT.status: %s [0x%"PRIx64"]\n",
-			chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
-			ioat->status);
+	IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n",
+		       chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
+		       ioat->status);
 
 	if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_HALTED) {
 		IOAT_PMD_WARN("Device HALTED on start, attempting to recover\n");