* [PATCH 1/2] net/nfp: add support for nfp cpp log print
2022-08-26 6:03 [PATCH 0/2] upgrade the log system of nfp PMD Chaoyong He
@ 2022-08-26 6:03 ` Chaoyong He
2022-08-26 6:03 ` [PATCH 2/2] net/nfp: use dpdk debug macro to control nfp Rx/Tx " Chaoyong He
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Chaoyong He @ 2022-08-26 6:03 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Long Wu
From: Long Wu <long.wu@corigine.com>
Nfp cpp log print is not available before. Add support for cpp
print log and set its initial priority to "NOTICE".
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_common.c | 1 +
drivers/net/nfp/nfp_logs.h | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 0e55f0c..fd46c84 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -1372,6 +1372,7 @@
RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_cpp, cpp, NOTICE);
/*
* Local variables:
* c-file-style: "Linux"
diff --git a/drivers/net/nfp/nfp_logs.h b/drivers/net/nfp/nfp_logs.h
index cc49a15..e22df70 100644
--- a/drivers/net/nfp/nfp_logs.h
+++ b/drivers/net/nfp/nfp_logs.h
@@ -30,7 +30,10 @@
#define ASSERT(x) do { } while (0)
#endif
-#define PMD_CPP_LOG(level, fmt, args...) do { } while (0)
+extern int nfp_logtype_cpp;
+#define PMD_CPP_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, nfp_logtype_cpp, \
+ "%s(): " fmt "\n", __func__, ## args)
extern int nfp_logtype_driver;
#define PMD_DRV_LOG(level, fmt, args...) \
--
1.8.3.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] net/nfp: use dpdk debug macro to control nfp Rx/Tx log print
2022-08-26 6:03 [PATCH 0/2] upgrade the log system of nfp PMD Chaoyong He
2022-08-26 6:03 ` [PATCH 1/2] net/nfp: add support for nfp cpp log print Chaoyong He
@ 2022-08-26 6:03 ` Chaoyong He
2022-09-20 18:02 ` Ferruh Yigit
2022-09-20 9:59 ` [PATCH 0/2] upgrade the log system of nfp PMD Niklas Söderlund
2022-09-20 18:03 ` Ferruh Yigit
3 siblings, 1 reply; 7+ messages in thread
From: Chaoyong He @ 2022-08-26 6:03 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, niklas.soderlund, Long Wu
From: Long Wu <long.wu@corigine.com>
Nfp log print was controlled by nfp's own macro before. This
commit changes to use dpdk debug rx/tx macro to control it.
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_logs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_logs.h b/drivers/net/nfp/nfp_logs.h
index e22df70..5da384e 100644
--- a/drivers/net/nfp/nfp_logs.h
+++ b/drivers/net/nfp/nfp_logs.h
@@ -14,14 +14,14 @@
"%s(): " fmt "\n", __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_RX
+#ifdef RTE_ETHDEV_DEBUG_RX
#define PMD_RX_LOG(level, fmt, args...) \
RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_TX
+#ifdef RTE_ETHDEV_DEBUG_TX
#define PMD_TX_LOG(level, fmt, args...) \
RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args)
#define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
--
1.8.3.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] net/nfp: use dpdk debug macro to control nfp Rx/Tx log print
2022-08-26 6:03 ` [PATCH 2/2] net/nfp: use dpdk debug macro to control nfp Rx/Tx " Chaoyong He
@ 2022-09-20 18:02 ` Ferruh Yigit
0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2022-09-20 18:02 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund, Long Wu
On 8/26/2022 7:03 AM, Chaoyong He wrote:
> From: Long Wu <long.wu@corigine.com>
>
> Nfp log print was controlled by nfp's own macro before. This
> commit changes to use dpdk debug rx/tx macro to control it.
>
> Signed-off-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] upgrade the log system of nfp PMD
2022-08-26 6:03 [PATCH 0/2] upgrade the log system of nfp PMD Chaoyong He
2022-08-26 6:03 ` [PATCH 1/2] net/nfp: add support for nfp cpp log print Chaoyong He
2022-08-26 6:03 ` [PATCH 2/2] net/nfp: use dpdk debug macro to control nfp Rx/Tx " Chaoyong He
@ 2022-09-20 9:59 ` Niklas Söderlund
2022-09-20 18:03 ` Ferruh Yigit
3 siblings, 0 replies; 7+ messages in thread
From: Niklas Söderlund @ 2022-09-20 9:59 UTC (permalink / raw)
To: dev, oss-drivers
Hi everyone,
A gentle ping on this.
On 2022-08-26 14:03:04 +0800, Chaoyong He wrote:
> This patch series do some upgrade of the log system of nfp PMD:
> Use DPDK debug macro to control the nfp Rx/Tx log.
> Add the support of nfp cpp log macro.
>
> Long Wu (2):
> net/nfp: add support for nfp cpp log print
> net/nfp: use dpdk debug macro to control nfp Rx/Tx log print
>
> drivers/net/nfp/nfp_common.c | 1 +
> drivers/net/nfp/nfp_logs.h | 9 ++++++---
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> --
> 1.8.3.1
>
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] upgrade the log system of nfp PMD
2022-08-26 6:03 [PATCH 0/2] upgrade the log system of nfp PMD Chaoyong He
` (2 preceding siblings ...)
2022-09-20 9:59 ` [PATCH 0/2] upgrade the log system of nfp PMD Niklas Söderlund
@ 2022-09-20 18:03 ` Ferruh Yigit
2022-09-21 7:09 ` Niklas Söderlund
3 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2022-09-20 18:03 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund
On 8/26/2022 7:03 AM, Chaoyong He wrote:
> This patch series do some upgrade of the log system of nfp PMD:
> Use DPDK debug macro to control the nfp Rx/Tx log.
> Add the support of nfp cpp log macro.
>
> Long Wu (2):
> net/nfp: add support for nfp cpp log print
> net/nfp: use dpdk debug macro to control nfp Rx/Tx log print
>
Series applied to dpdk-next-net/main, thanks.
Patch titles updated slightly, to remove duplicated 'nfp' etc, please
double check them in the next-net git repo.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] upgrade the log system of nfp PMD
2022-09-20 18:03 ` Ferruh Yigit
@ 2022-09-21 7:09 ` Niklas Söderlund
0 siblings, 0 replies; 7+ messages in thread
From: Niklas Söderlund @ 2022-09-21 7:09 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Chaoyong He, dev, oss-drivers
On 2022-09-20 19:03:42 +0100, Ferruh Yigit wrote:
> On 8/26/2022 7:03 AM, Chaoyong He wrote:
> > This patch series do some upgrade of the log system of nfp PMD:
> > Use DPDK debug macro to control the nfp Rx/Tx log.
> > Add the support of nfp cpp log macro.
> >
> > Long Wu (2):
> > net/nfp: add support for nfp cpp log print
> > net/nfp: use dpdk debug macro to control nfp Rx/Tx log print
> >
>
> Series applied to dpdk-next-net/main, thanks.
>
>
> Patch titles updated slightly, to remove duplicated 'nfp' etc, please double
> check them in the next-net git repo.
Looks good, thanks!
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 7+ messages in thread