* [PATCH] dma/ioat: remove printf within ioat driver
@ 2023-02-03 16:35 Conor Walsh
2023-02-03 17:07 ` Bruce Richardson
2023-02-07 10:48 ` [PATCH v2] " Conor Walsh
0 siblings, 2 replies; 5+ messages in thread
From: Conor Walsh @ 2023-02-03 16:35 UTC (permalink / raw)
To: bruce.richardson, thomas; +Cc: dev, 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.
Signed-off-by: Conor Walsh <conor.walsh@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);
if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_HALTED) {
IOAT_PMD_WARN("Device HALTED on start, attempting to recover\n");
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dma/ioat: remove printf within ioat driver
2023-02-03 16:35 [PATCH] dma/ioat: remove printf within ioat driver Conor Walsh
@ 2023-02-03 17:07 ` Bruce Richardson
2023-02-07 10:47 ` Walsh, Conor
2023-02-07 10:48 ` [PATCH v2] " Conor Walsh
1 sibling, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2023-02-03 17:07 UTC (permalink / raw)
To: Conor Walsh; +Cc: thomas, dev
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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] dma/ioat: remove printf within ioat driver
2023-02-03 17:07 ` Bruce Richardson
@ 2023-02-07 10:47 ` Walsh, Conor
0 siblings, 0 replies; 5+ messages in thread
From: Walsh, Conor @ 2023-02-07 10:47 UTC (permalink / raw)
To: Richardson, Bruce; +Cc: thomas, dev
> 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
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] dma/ioat: remove printf within ioat driver
2023-02-03 16:35 [PATCH] dma/ioat: remove printf within ioat driver Conor Walsh
2023-02-03 17:07 ` Bruce Richardson
@ 2023-02-07 10:48 ` Conor Walsh
2023-02-20 0:38 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Conor Walsh @ 2023-02-07 10:48 UTC (permalink / raw)
To: bruce.richardson, thomas; +Cc: dev, 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
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: fix whitespace issue
---
drivers/dma/ioat/ioat_dmadev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 5906eb45aa..84b3dfdb75 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -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);
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] dma/ioat: remove printf within ioat driver
2023-02-07 10:48 ` [PATCH v2] " Conor Walsh
@ 2023-02-20 0:38 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2023-02-20 0:38 UTC (permalink / raw)
To: Conor Walsh; +Cc: bruce.richardson, dev
07/02/2023 11:48, 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
>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-20 0:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 16:35 [PATCH] dma/ioat: remove printf within ioat driver Conor Walsh
2023-02-03 17:07 ` Bruce Richardson
2023-02-07 10:47 ` Walsh, Conor
2023-02-07 10:48 ` [PATCH v2] " Conor Walsh
2023-02-20 0:38 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).