Skip to contentSkip to conversation

dma/ioat: remove printf within ioat driver

PATCH Superseded Conor Walsh 3 participants 5 messages Feb 3, 2023 – Feb 20, 2023 dmaengine

lore
Share & tools
lore
#0 lore raw

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
index 5906eb45aa..3fe50ea4a4 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Conor Walsh

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.

---

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
index 5906eb45aa..3fe50ea4a4 100644

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 -0
 	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
#2 lore raw
Quoted 11 lines · Conor Walsh
Quoted 6 lines

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.

---

One little nit below, but with that fixed

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.c

drivers/dma/ioat/ioat_dmadev.c ioat_dev_start(struct rte_dma_dev *dev) · line 147

Quoted 6 lines

index 5906eb45aa..3fe50ea4a4 100644

drivers/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 -0
 	if ((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 -0
 		IOAT_PMD_WARN("Device HALTED on start, attempting to

recover\n");

Quoted 3 lines
drivers/dma/ioat/ioat_dmadev.c +0 -1
--

2.25.1

#3 lore raw

PATCH v2 1/1 dma/ioat: remove printf within ioat driver

In reply to Conor Walsh

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

---

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
index 5906eb45aa..84b3dfdb75 100644
@@ -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