* RE: no printf in drivers code
2023-02-03 13:57 no printf in drivers code Thomas Monjalon
@ 2023-02-03 16:18 ` Honnappa Nagarahalli
2023-02-03 16:40 ` Thomas Monjalon
2023-02-03 16:38 ` Walsh, Conor
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Honnappa Nagarahalli @ 2023-02-03 16:18 UTC (permalink / raw)
To: thomas, Nicolas Chautru, hemant.agrawal, Sachin Saxena,
Gagandeep Singh, Sunil Uttarwar, Bruce Richardson, Conor Walsh,
Chaoyong He, Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat,
Jiawen Wu, Jian Wang, Rosen Xu, Tianfei zhang
Cc: dev, Ferruh Yigit, Andrew Rybchenko, david.marchand, nd, nd
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, February 3, 2023 7:57 AM
> To: Nicolas Chautru <nicolas.chautru@intel.com>; hemant.agrawal@nxp.com;
> Sachin Saxena <sachin.saxena@oss.nxp.com>; Gagandeep Singh
> <g.singh@nxp.com>; Sunil Uttarwar <sunilprakashrao.uttarwar@amd.com>;
> Bruce Richardson <bruce.richardson@intel.com>; Conor Walsh
> <conor.walsh@intel.com>; Chaoyong He <chaoyong.he@corigine.com>; Niklas
> Soderlund <niklas.soderlund@corigine.com>; Rasesh Mody
> <rmody@marvell.com>; Devendra Singh Rawat <dsinghrawat@marvell.com>;
> Jiawen Wu <jiawenwu@trustnetic.com>; Jian Wang
> <jianwang@trustnetic.com>; Rosen Xu <rosen.xu@intel.com>; Tianfei zhang
> <tianfei.zhang@intel.com>
> Cc: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@amd.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; david.marchand@redhat.com
> Subject: no printf in drivers code
>
> Hello,
>
> We have too many drivers using printf() instead of rte_log().
> Please propose a plan to replace or remove the calls to printf().
> If no plan, I could propose one but you may not like it :)
Does it make sense to add scripts to CI to capture this issue? In general, we do not want printfs in DPDK code (other than tests, sample apps?)
>
> Affected drivers are:
> baseband/acc
> bus/dpaa
> bus/fslmc
> crypto/caam_jr
> crypto/ccp
> dma/ioat
> net/dpaa
> net/dpaa2
> net/nfp
> net/qede
> net/txgbe
> raw/ifpga
>
> PS: printf is allowed for tests and dumps.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: no printf in drivers code
2023-02-03 16:18 ` Honnappa Nagarahalli
@ 2023-02-03 16:40 ` Thomas Monjalon
2023-02-03 18:35 ` David Marchand
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2023-02-03 16:40 UTC (permalink / raw)
To: Nicolas Chautru, hemant.agrawal, Sachin Saxena, Gagandeep Singh,
Sunil Uttarwar, Bruce Richardson, Conor Walsh, Chaoyong He,
Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Rosen Xu, Tianfei zhang, Honnappa Nagarahalli
Cc: dev, Ferruh Yigit, Andrew Rybchenko, david.marchand
03/02/2023 17:18, Honnappa Nagarahalli:
> From: Thomas Monjalon <thomas@monjalon.net>
> >
> > We have too many drivers using printf() instead of rte_log().
> > Please propose a plan to replace or remove the calls to printf().
> > If no plan, I could propose one but you may not like it :)
>
> Does it make sense to add scripts to CI to capture this issue?
> In general, we do not want printfs in DPDK code (other than tests, sample apps?)
It's difficult to automate because printfs are acceptable
in dump functions, selftest, and testpmd code hosted in drivers directories.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: no printf in drivers code
2023-02-03 16:40 ` Thomas Monjalon
@ 2023-02-03 18:35 ` David Marchand
2023-02-04 4:38 ` Honnappa Nagarahalli
0 siblings, 1 reply; 9+ messages in thread
From: David Marchand @ 2023-02-03 18:35 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Nicolas Chautru, hemant.agrawal, Sachin Saxena, Gagandeep Singh,
Sunil Uttarwar, Bruce Richardson, Conor Walsh, Chaoyong He,
Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Rosen Xu, Tianfei zhang, Honnappa Nagarahalli, dev,
Ferruh Yigit, Andrew Rybchenko
On Fri, Feb 3, 2023 at 5:40 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 03/02/2023 17:18, Honnappa Nagarahalli:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > >
> > > We have too many drivers using printf() instead of rte_log().
> > > Please propose a plan to replace or remove the calls to printf().
> > > If no plan, I could propose one but you may not like it :)
> >
> > Does it make sense to add scripts to CI to capture this issue?
> > In general, we do not want printfs in DPDK code (other than tests, sample apps?)
>
> It's difficult to automate because printfs are acceptable
> in dump functions, selftest, and testpmd code hosted in drivers directories.
We can identify which parts need those, create dedicated helpers that
do call printf (but are excluded from the check), and and then the
printf exclusion is applied to the whole tree.
--
David Marchand
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: no printf in drivers code
2023-02-03 18:35 ` David Marchand
@ 2023-02-04 4:38 ` Honnappa Nagarahalli
0 siblings, 0 replies; 9+ messages in thread
From: Honnappa Nagarahalli @ 2023-02-04 4:38 UTC (permalink / raw)
To: David Marchand, thomas
Cc: Nicolas Chautru, hemant.agrawal, Sachin Saxena, Gagandeep Singh,
Sunil Uttarwar, Bruce Richardson, Conor Walsh, Chaoyong He,
Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Rosen Xu, Tianfei zhang, dev, Ferruh Yigit,
Andrew Rybchenko, nd, nd
<snip>
> Subject: Re: no printf in drivers code
>
> On Fri, Feb 3, 2023 at 5:40 PM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > 03/02/2023 17:18, Honnappa Nagarahalli:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > >
> > > > We have too many drivers using printf() instead of rte_log().
> > > > Please propose a plan to replace or remove the calls to printf().
> > > > If no plan, I could propose one but you may not like it :)
> > >
> > > Does it make sense to add scripts to CI to capture this issue?
> > > In general, we do not want printfs in DPDK code (other than tests,
> > > sample apps?)
> >
> > It's difficult to automate because printfs are acceptable in dump
> > functions, selftest, and testpmd code hosted in drivers directories.
>
> We can identify which parts need those, create dedicated helpers that do call
> printf (but are excluded from the check), and and then the printf exclusion is
> applied to the whole tree.
+1
>
>
> --
> David Marchand
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: no printf in drivers code
2023-02-03 13:57 no printf in drivers code Thomas Monjalon
2023-02-03 16:18 ` Honnappa Nagarahalli
@ 2023-02-03 16:38 ` Walsh, Conor
2023-02-04 0:46 ` Chautru, Nicolas
2023-02-06 14:16 ` Niklas Soderlund
3 siblings, 0 replies; 9+ messages in thread
From: Walsh, Conor @ 2023-02-03 16:38 UTC (permalink / raw)
To: Thomas Monjalon, Chautru, Nicolas, Hemant Agrawal, Sachin Saxena,
Gagandeep Singh, Sunil Uttarwar, Richardson, Bruce, Chaoyong He,
Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Xu, Rosen, Zhang, Tianfei
Cc: dev, Ferruh Yigit, Andrew Rybchenko, david.marchand
> Hello,
>
> We have too many drivers using printf() instead of rte_log().
> Please propose a plan to replace or remove the calls to printf().
> If no plan, I could propose one but you may not like it :)
>
> Affected drivers are:
> baseband/acc
> bus/dpaa
> bus/fslmc
> crypto/caam_jr
> crypto/ccp
> dma/ioat
> net/dpaa
> net/dpaa2
> net/nfp
> net/qede
> net/txgbe
> raw/ifpga
>
> PS: printf is allowed for tests and dumps.
Hi Thomas,
I sent a patch to the mailing list to swap the printf in the IOAT driver to rte log.
I didn't change the fptintf's within the dump function as advised above.
Thanks,
Conor.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: no printf in drivers code
2023-02-03 13:57 no printf in drivers code Thomas Monjalon
2023-02-03 16:18 ` Honnappa Nagarahalli
2023-02-03 16:38 ` Walsh, Conor
@ 2023-02-04 0:46 ` Chautru, Nicolas
2023-02-06 14:16 ` Niklas Soderlund
3 siblings, 0 replies; 9+ messages in thread
From: Chautru, Nicolas @ 2023-02-04 0:46 UTC (permalink / raw)
To: Thomas Monjalon, Hemant Agrawal, Sachin Saxena, Gagandeep Singh,
Sunil Uttarwar, Richardson, Bruce, Walsh, Conor, Chaoyong He,
Niklas Soderlund, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Xu, Rosen, Zhang, Tianfei
Cc: dev, Ferruh Yigit, Andrew Rybchenko, david.marchand
> From: Thomas Monjalon <thomas@monjalon.net>
>
> Hello,
>
> We have too many drivers using printf() instead of rte_log().
> Please propose a plan to replace or remove the calls to printf().
> If no plan, I could propose one but you may not like it :)
>
> Affected drivers are:
> baseband/acc
Will push a patch for this next week. These actually currently only occur when called indirectly from test application, but still no concern to replace.
> bus/dpaa
> bus/fslmc
> crypto/caam_jr
> crypto/ccp
> dma/ioat
> net/dpaa
> net/dpaa2
> net/nfp
> net/qede
> net/txgbe
> raw/ifpga
>
> PS: printf is allowed for tests and dumps.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: no printf in drivers code
2023-02-03 13:57 no printf in drivers code Thomas Monjalon
` (2 preceding siblings ...)
2023-02-04 0:46 ` Chautru, Nicolas
@ 2023-02-06 14:16 ` Niklas Soderlund
2023-02-08 12:32 ` Hemant Agrawal
3 siblings, 1 reply; 9+ messages in thread
From: Niklas Soderlund @ 2023-02-06 14:16 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Nicolas Chautru, Hemant Agrawal, Sachin Saxena, Gagandeep Singh,
Sunil Uttarwar, Bruce Richardson, Conor Walsh, Chaoyong He,
Rasesh Mody, Devendra Singh Rawat, Jiawen Wu, Jian Wang,
Rosen Xu, Tianfei zhang, dev, Ferruh Yigit, Andrew Rybchenko,
david.marchand
Hi Thomas,
On 2023-02-03 14:57:06 +0100, Thomas Monjalon wrote:
> Hello,
>
> We have too many drivers using printf() instead of rte_log().
> Please propose a plan to replace or remove the calls to printf().
> If no plan, I could propose one but you may not like it :)
>
> Affected drivers are:
> baseband/acc
> bus/dpaa
> bus/fslmc
> crypto/caam_jr
> crypto/ccp
> dma/ioat
> net/dpaa
> net/dpaa2
> net/nfp
A patch for NFP have been post as part of the series '[PATCH 0/3]
cleanup the PMD'.
> net/qede
> net/txgbe
> raw/ifpga
>
> PS: printf is allowed for tests and dumps.
>
>
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: no printf in drivers code
2023-02-06 14:16 ` Niklas Soderlund
@ 2023-02-08 12:32 ` Hemant Agrawal
0 siblings, 0 replies; 9+ messages in thread
From: Hemant Agrawal @ 2023-02-08 12:32 UTC (permalink / raw)
To: Niklas Soderlund, Thomas Monjalon
Cc: Nicolas Chautru, Sachin Saxena (OSS),
Gagandeep Singh, Sunil Uttarwar, Bruce Richardson, Conor Walsh,
Chaoyong He, Rasesh Mody, Devendra Singh Rawat, Jiawen Wu,
Jian Wang, Rosen Xu, Tianfei zhang, dev, Ferruh Yigit,
Andrew Rybchenko, david.marchand
Hi Thomas,
On 2023-02-03 14:57:06 +0100, Thomas Monjalon wrote:
> Hello,
> >
> > We have too many drivers using printf() instead of rte_log().
> > Please propose a plan to replace or remove the calls to printf().
> > If no plan, I could propose one but you may not like it :)
> >
> > Affected drivers are:
> > baseband/acc
> > bus/dpaa
> > bus/fslmc
> > crypto/caam_jr
> > crypto/ccp
> > dma/ioat
> > net/dpaa
> > net/dpaa2
[Hemant] NXP will send the patches shortly.
> > net/nfp
> > net/qede
> > net/txgbe
> > raw/ifpga
> >
Regards
Hemant
^ permalink raw reply [flat|nested] 9+ messages in thread