dma/ioat: remove printf within ioat driver
PATCH 1/1 dma/ioat: remove printf within ioat driver
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.
--- drivers/dma/ioat/ioat_dmadev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/dma/ioat/ioat_dmadev.c +3 -3
@@ -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" );
Signature · 1 line
2.25.1
Quoted 6 lines · Conor Walsh
rte_logshould 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 <[email protected]>---
One little nit below, but with that fixed
Quoted 8 lines
drivers/dma/ioat/ioat_dmadev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/dma/ioat/ioat_dmadev.c +0
-0
drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 152
Quoted 10 lines
drivers/dma/ioat/ioat_dmadev.c +3
-3@@ -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.
Quoted 5 lines
drivers/dma/ioat/ioat_dmadev.c +0
-0if ((ioat->regs->chansts &IOAT_CHANSTS_STATUS ) ==IOAT_CHANSTS_HALTED ) {IOAT_PMD_WARN ("Device HALTED on start, attempting to recover\n" );Signature · 1 line
2.25.1
Quoted 11 lines · Conor Walsh
Quoted 6 lines
rte_logshould 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 <[email protected]>---
One little nit below, but with that fixed
Acked-by Bruce Richardson <[email protected]>
Thanks for the ack!
Quoted 21 lines
Review
Quoted 5 lines
drivers/dma/ioat/ioat_dmadev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/dma/ioat/ioat_dmadev.cdrivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 147
Quoted 6 lines
index
5906eb45aa..3fe50ea4a4100644drivers/dma/ioat/ioat_dmadev.c +0
-0@@ -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);drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 149
Quoted 3 lines
drivers/dma/ioat/ioat_dmadev.c +0
-2- printf("IOAT.status: %s [0x%"PRIx64"]\n", - chansts_readable[ioat->status &
IOAT_CHANSTS_STATUS],drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev)
Quoted 3 lines
drivers/dma/ioat/ioat_dmadev.c +2
-1- ioat->status); + IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n", + chansts_readable[ioat->status &
IOAT_CHANSTS_STATUS],
Quoted 5 lines
drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 152
Quoted 2 lines
drivers/dma/ioat/ioat_dmadev.c +1
-0+ 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.
Quoted 8 lines
drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 152
Quoted 2 lines
drivers/dma/ioat/ioat_dmadev.c +0
-0if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) ==
IOAT_CHANSTS_HALTED) {drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 153
Quoted 1 line
drivers/dma/ioat/ioat_dmadev.c +0
-0IOAT_PMD_WARN("Device HALTED on start, attempting torecover\n");
Quoted 3 lines
drivers/dma/ioat/ioat_dmadev.c +0
-1--2.25.1
PATCH v2 1/1 dma/ioat: remove printf within ioat driver
In reply to Conor Walshrte_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
---
v2: fix whitespace issue
--- drivers/dma/ioat/ioat_dmadev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ioat/ioat_dmadev.c +1 -1
@@ -146,7 +146,7 @@ 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" , +IOAT_PMD_DEBUG ("channel status - %s [0x%" PRIx64"]\n" , chansts_readable[ioat->status &IOAT_CHANSTS_STATUS ], ioat->status);
Signature · 1 line
2.25.1
Thomas Monjalon
Applied07/02/2023 11:48, Conor Walsh:
Quoted 6 lines
rte_logshould 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 retainedSigned-off-by Conor Walsh <[email protected]>Acked-by Bruce Richardson <[email protected]>
Applied, thanks.