DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ark: fix meson build
@ 2020-08-19 15:35 Ed Czeck
  2020-08-19 16:29 ` Ferruh Yigit
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Ed Czeck @ 2020-08-19 15:35 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

* Set RTE_LIBRTE_ARK_PAD_TX in local meson.build to match
the CONFIG_RTE_LIBRTE_ARK_PAD_TX setting used in make.
* Install header file needed for dynamic library.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 99151bba1..6840bc622 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -11,3 +11,6 @@ sources = files('ark_ddm.c',
 	'ark_pktgen.c',
 	'ark_rqp.c',
 	'ark_udm.c')
+
+install_headers('ark_ext.h')
+cflags += '-DRTE_LIBRTE_ARK_PAD_TX'
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ark: fix meson build
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
@ 2020-08-19 16:29 ` Ferruh Yigit
  2020-08-19 20:45 ` Ed Czeck
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-19 16:29 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/19/2020 4:35 PM, Ed Czeck wrote:
> * Set RTE_LIBRTE_ARK_PAD_TX in local meson.build to match
> the CONFIG_RTE_LIBRTE_ARK_PAD_TX setting used in make.
> * Install header file needed for dynamic library.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  drivers/net/ark/meson.build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
> index 99151bba1..6840bc622 100644
> --- a/drivers/net/ark/meson.build
> +++ b/drivers/net/ark/meson.build
> @@ -11,3 +11,6 @@ sources = files('ark_ddm.c',
>  	'ark_pktgen.c',
>  	'ark_rqp.c',
>  	'ark_udm.c')
> +
> +install_headers('ark_ext.h')
> +cflags += '-DRTE_LIBRTE_ARK_PAD_TX'
> 

Hi Ed,

Why not remove the 'RTE_LIBRTE_ARK_PAD_TX' completely, this is a good
opportunity for it. In meson it is not really a config option as it is.

This can be default option or can be converted into runtime config.
For runtime config it can be a devarg, but since it is in Tx data path, if you
don't want additional condition perhaps defining this as an alternative Tx burst
function can work.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH] net/ark: fix meson build
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
  2020-08-19 16:29 ` Ferruh Yigit
@ 2020-08-19 20:45 ` Ed Czeck
  2020-08-20 11:16   ` Ferruh Yigit
  2020-08-20 21:55 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-19 20:45 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

* Rename net/ark specific CONFIG_RTE macros to local macros.
* Change condition of ARK_PAD_TX to match behavior of meson build
to makefile build.
* Install header file needed for dynamic library.
* Update doc as required.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst     | 24 ++++++++++++++----------
 drivers/net/ark/ark_logs.h  | 16 +++++++---------
 drivers/net/ark/meson.build |  2 ++
 3 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..4d8920cd0 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -124,27 +124,31 @@ Configuration Information
 
 **DPDK Configuration Parameters**
 
-  The following configuration options are available for the ARK PMD:
+  The following compile-time configuration options are available for the ARK PMD:
 
-   * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
-     of the ARK PMD driver in the DPDK compilation.
+   * **ARK_NOPAD_TX**:  When enabled TX
+     packets are not padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
+   * **ARK_DEBUG_RX**: Enables debug
      logging and internal checking of RX ingress logic within the ARK PMD driver.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
+   * **ARK_DEBUG_TX**: Enables debug
      logging and internal checking of TX egress logic within the ARK PMD driver.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
+   * **ARK_DEBUG_STATS**: Enables debug
      logging of detailed packet and performance statistics gathered in
      the PMD and FPGA.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
+   * **ARK_DEBUG_TRACE**: Enables debug
      logging of detailed PMD events and status.
 
+Note that enabling debugging options may affect system performance.
+These options may be set by specifying them in CFLAG
+environment before the meson build set.   E.g.::
+
+    export CFLAGS="-DARK_DEBUG_TRACE"
+    meson build
+
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..125583475 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -6,14 +6,12 @@
 #define _ARK_DEBUG_H_
 
 #include <inttypes.h>
-#include <rte_log.h>
-
 
 /* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
+#ifdef ARK_NOPAD_TX
 #define ARK_TX_PAD_TO_60   0
+#else
+#define ARK_TX_PAD_TO_60   1
 #endif
 
 /* system camel case definition changed to upper case */
@@ -55,7 +53,7 @@ extern int ark_logtype;
 
 
 /* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
+#ifdef ARK_DEBUG_TRACE
 #define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
 #define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
 #else
@@ -65,7 +63,7 @@ extern int ark_logtype;
 
 
 /* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
+#ifdef ARK_DEBUG_STATS
 #define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
 #else
 #define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
@@ -73,7 +71,7 @@ extern int ark_logtype;
 
 
 /* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
+#ifdef ARK_DEBUG_RX
 #define ARK_RX_DEBUG 1
 #define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
 #else
@@ -82,7 +80,7 @@ extern int ark_logtype;
 #endif
 
 /* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
+#ifdef ARK_DEBUG_TX
 #define ARK_TX_DEBUG       1
 #define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
 #else
diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 99151bba1..fbbc085bb 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -11,3 +11,5 @@ sources = files('ark_ddm.c',
 	'ark_pktgen.c',
 	'ark_rqp.c',
 	'ark_udm.c')
+
+install_headers('ark_ext.h')
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ark: fix meson build
  2020-08-19 20:45 ` Ed Czeck
@ 2020-08-20 11:16   ` Ferruh Yigit
  2020-08-20 15:41     ` Ed Czeck
  0 siblings, 1 reply; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-20 11:16 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/19/2020 9:45 PM, Ed Czeck wrote:
> * Rename net/ark specific CONFIG_RTE macros to local macros.
> * Change condition of ARK_PAD_TX to match behavior of meson build
> to makefile build.
> * Install header file needed for dynamic library.
> * Update doc as required.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  doc/guides/nics/ark.rst     | 24 ++++++++++++++----------
>  drivers/net/ark/ark_logs.h  | 16 +++++++---------
>  drivers/net/ark/meson.build |  2 ++
>  3 files changed, 23 insertions(+), 19 deletions(-)
> 
> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> index 06e8c3374..4d8920cd0 100644
> --- a/doc/guides/nics/ark.rst
> +++ b/doc/guides/nics/ark.rst
> @@ -124,27 +124,31 @@ Configuration Information
>  
>  **DPDK Configuration Parameters**
>  
> -  The following configuration options are available for the ARK PMD:
> +  The following compile-time configuration options are available for the ARK PMD:
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
> -     of the ARK PMD driver in the DPDK compilation.
> +   * **ARK_NOPAD_TX**:  When enabled TX
> +     packets are not padded to 60 bytes to support downstream MACS.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> -     packets are padded to 60 bytes to support downstream MACS.
> -
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
> +   * **ARK_DEBUG_RX**: Enables debug
>       logging and internal checking of RX ingress logic within the ARK PMD driver.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
> +   * **ARK_DEBUG_TX**: Enables debug
>       logging and internal checking of TX egress logic within the ARK PMD driver.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
> +   * **ARK_DEBUG_STATS**: Enables debug
>       logging of detailed packet and performance statistics gathered in
>       the PMD and FPGA.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
> +   * **ARK_DEBUG_TRACE**: Enables debug
>       logging of detailed PMD events and status.

Logging can be controlled in runtime, that is what we should use.
In data path, we use compile time flags because of the performance issues. So OK
to have 'CONFIG_RTE_LIBRTE_ARK_DEBUG_RX' & 'CONFIG_RTE_LIBRTE_ARK_DEBUG_TX' as
compile time flag, but why having compile time flag for rest?

>  
> +Note that enabling debugging options may affect system performance.
> +These options may be set by specifying them in CFLAG
> +environment before the meson build set.   E.g.::
> +
> +    export CFLAGS="-DARK_DEBUG_TRACE"
> +    meson build
> +

When you passed the flag as above, it is still global to all components in the
DPDK, this is not just for ark. What is the motivation to remove the
"RET_LIBRTE_" prefix?

>  
>  Building DPDK
>  -------------
> diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
> index 44aac6102..125583475 100644
> --- a/drivers/net/ark/ark_logs.h
> +++ b/drivers/net/ark/ark_logs.h
> @@ -6,14 +6,12 @@
>  #define _ARK_DEBUG_H_
>  
>  #include <inttypes.h>
> -#include <rte_log.h>
> -
>  
>  /* Configuration option to pad TX packets to 60 bytes */
> -#ifdef RTE_LIBRTE_ARK_PAD_TX
> -#define ARK_TX_PAD_TO_60   1
> -#else
> +#ifdef ARK_NOPAD_TX
>  #define ARK_TX_PAD_TO_60   0
> +#else
> +#define ARK_TX_PAD_TO_60   1
>  #endif

So you don't want to convert this to runtime configuration.

The point we are reducing compile time flags:
1) It forks the code paths and by time it leave not tested, even not compiled
code paths which may cause rotten code by time.

2) Multiple code paths will lead deployment problems. When you deploy an
application, you won't able to change the compile time configuration in customer
environment and need to re-compile (most probably re-test) and re-deploy it.
Also there is not easy way to figure out from binary in customer environment
that with which compile time flags it has been built.

Switching to CFLAGS="..." doesn't make above concerns go away and indeed it
makes (1) worst since hides the config options within the driver. Previously it
was possible to trigger each config option and do testing using scripts, now
since config options are hidden in driver we can't do even that.

Can you please detail why "ARK_TX_PAD_TO_60" is needed exactly?
And can you please justify why it has to be compile time config option?

<...>

> @@ -11,3 +11,5 @@ sources = files('ark_ddm.c',
>  	'ark_pktgen.c',
>  	'ark_rqp.c',
>  	'ark_udm.c')
> +
> +install_headers('ark_ext.h')
> 

Installing PMD header file is not required but this has an unique usage.

Ark PMD is wrapper to the external shared library which should implement the
functions that has prototypes in the 'ark_ext.h'.

Since this header is not needed by users of the dpdk library, but needed by
extension developers for the ark PMD, I think the header should not be installed.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ark: fix meson build
  2020-08-20 11:16   ` Ferruh Yigit
@ 2020-08-20 15:41     ` Ed Czeck
  2020-08-21  9:44       ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-20 15:41 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Richardson, Bruce, Shepard Siegel, John Miller

On Thu, Aug 20, 2020 at 7:16 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
...
>
> Logging can be controlled in runtime, that is what we should use.
> In data path, we use compile time flags because of the performance issues. So OK
> to have 'CONFIG_RTE_LIBRTE_ARK_DEBUG_RX' & 'CONFIG_RTE_LIBRTE_ARK_DEBUG_TX' as
> compile time flag, but why having compile time flag for rest?

Agreed.  We'll remove most of these macro in the next commit pushing
the behavior
into run-time log control.

> >
> > +Note that enabling debugging options may affect system performance.
> > +These options may be set by specifying them in CFLAG
> > +environment before the meson build set.   E.g.::
> > +
> > +    export CFLAGS="-DARK_DEBUG_TRACE"
> > +    meson build
> > +
>
> When you passed the flag as above, it is still global to all components in the
> DPDK, this is not just for ark. What is the motivation to remove the
> "RET_LIBRTE_" prefix?

There are 2 issues here.
1) With the makefile flow, users could add other configurations with
the documented
and recommended sed commands.  I.e.,
sed -ri 's/(CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE)=n/\1=y/' build/.config
The makefiles took care of everything from there.  This no longer works with the
meson build flow.  The solution is to set that macro passing it in the
CFLAG environment.
We're open to other recommendations.
2) Is there an advantage of promoting a PMD macro to a global macro?
It seems to add to the noise of dpdk configuration and there are many
PMD specific macros throughout the code base.

>
> >
> >  Building DPDK
> >  -------------
> > diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
> > index 44aac6102..125583475 100644
> > --- a/drivers/net/ark/ark_logs.h
> > +++ b/drivers/net/ark/ark_logs.h
> > @@ -6,14 +6,12 @@
> >  #define _ARK_DEBUG_H_
> >
> >  #include <inttypes.h>
> > -#include <rte_log.h>
> > -
> >
> >  /* Configuration option to pad TX packets to 60 bytes */
> > -#ifdef RTE_LIBRTE_ARK_PAD_TX
> > -#define ARK_TX_PAD_TO_60   1
> > -#else
> > +#ifdef ARK_NOPAD_TX
> >  #define ARK_TX_PAD_TO_60   0
> > +#else
> > +#define ARK_TX_PAD_TO_60   1
> >  #endif
>
> So you don't want to convert this to runtime configuration.
>
> The point we are reducing compile time flags:
> 1) It forks the code paths and by time it leave not tested, even not compiled
> code paths which may cause rotten code by time.
>
> 2) Multiple code paths will lead deployment problems. When you deploy an
> application, you won't able to change the compile time configuration in customer
> environment and need to re-compile (most probably re-test) and re-deploy it.
> Also there is not easy way to figure out from binary in customer environment
> that with which compile time flags it has been built.
>
> Switching to CFLAGS="..." doesn't make above concerns go away and indeed it
> makes (1) worst since hides the config options within the driver. Previously it
> was possible to trigger each config option and do testing using scripts, now
> since config options are hidden in driver we can't do even that.
>
> Can you please detail why "ARK_TX_PAD_TO_60" is needed exactly?
> And can you please justify why it has to be compile time config option?
>
The need to pad packets is dependent on the underlying FPGA hardware
implementation which lies outside the control of our deliverables.  Thus we
leave control up to our customer and how they deliver and deploy DPDK.  This
needs to be a compile-time macro since the code executes within the
per-packet processing under rte_eth_tx_burst().

We can change the macro to ARK_MIN_TX_PKTLEN, which should have zero
overhead when set to 0.  (I'm assuming that compiles will remove if
(unsigned < 0) blocks.)  Should this be an RTE_LIBRTE macro?  How does
a user change this during compile?

> <...>
>
> > @@ -11,3 +11,5 @@ sources = files('ark_ddm.c',
> >       'ark_pktgen.c',
> >       'ark_rqp.c',
> >       'ark_udm.c')
> > +
> > +install_headers('ark_ext.h')
> >
>
> Installing PMD header file is not required but this has an unique usage.
>
> Ark PMD is wrapper to the external shared library which should implement the
> functions that has prototypes in the 'ark_ext.h'.
>
> Since this header is not needed by users of the dpdk library, but needed by
> extension developers for the ark PMD, I think the header should not be installed.

So is your recommendation that anyone developing an ark pmd extension
must have access to DPDK source, in addition to the installed code?
It seems like one include location is better than two.

Many thanks,
Ed.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
  2020-08-19 16:29 ` Ferruh Yigit
  2020-08-19 20:45 ` Ed Czeck
@ 2020-08-20 21:55 ` Ed Czeck
  2020-08-20 21:55   ` [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro Ed Czeck
  2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-20 21:55 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ------
 drivers/net/ark/ark_ddm.c       | 12 ++---
 drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
 drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
 drivers/net/ark/ark_ethdev_tx.c | 10 ++---
 drivers/net/ark/ark_logs.h      | 63 +++------------------------
 drivers/net/ark/ark_mpu.c       | 32 ++++----------
 drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
 drivers/net/ark/ark_pktdir.c    |  2 +-
 drivers/net/ark/ark_pktgen.c    | 22 +++++-----
 drivers/net/ark/ark_rqp.c       |  4 +-
 drivers/net/ark/ark_udm.c       | 18 ++++----
 12 files changed, 125 insertions(+), 210 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..c3ffcbbc2 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 57026f8d1..91d1179d8 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
 	uint32_t hw_const;
 	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-		PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+		ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
 			    ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
 		return -1;
 	}
 
 	hw_const = ddm->cfg.const0;
 	if (hw_const == ARK_DDM_CONST1) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module is version 1, "
 			    "PMD expects version 2\n");
 		return -1;
 	} else if (hw_const != ARK_DDM_CONST2) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module not found as expected 0x%08x\n",
 			    ddm->cfg.const0);
 		return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
 	status = ark_ddm_stop(ddm, 1);
 
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		ddm->cfg.command = 4;
 		usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-	PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
 		     ark_ddm_is_stopped(ddm)
 		     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
 	struct ark_ddm_stats_t *stats = &ddm->stats;
 
-	PMD_STATS_LOG(INFO, "DDM Stats: %s"
+	ARK_PMD_LOG(INFO, "DDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64
 		      "\n", msg,
 		      "Bytes:", stats->tx_byte_count,
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd867..646427d0c 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
 	const char *dllpath = getenv("ARK_EXT_PATH");
 
 	if (dllpath == NULL) {
-		PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+		ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
 		return 0;
 	}
-	PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+	ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
 	/* Open and load the .so */
 	ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
 	if (ark->d_handle == NULL) {
-		PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+		ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
 			    dllpath);
 		return -1;
 	}
-	PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+	ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
 			    dllpath);
 
 	/* Get the entry points */
 	ark->user_ext.dev_init =
 		(void *(*)(struct rte_eth_dev *, void *, int))
 		dlsym(ark->d_handle, "dev_init");
-	PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+	ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
 		      ark->user_ext.dev_init);
 	ark->user_ext.dev_get_port_count =
 		(int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	ark->eth_dev = dev;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
+	ARK_PMD_LOG(DEBUG, "\n");
 
 	/* Check to see if there is an extension that we need to load */
 	ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
 
-	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
 		      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-	PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
 		    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
 	/* If HW sanity test fails, return an error */
 	if (ark->sysctrl.t32[4] != 0xcafef00d) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "HW Sanity test has failed, expected constant"
 			    " 0x%x, read 0x%x (%s)\n",
 			    0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	}
 	if (ark->sysctrl.t32[3] != 0) {
 		if (ark_rqp_lasped(ark->rqpacing)) {
-			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+			ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
 				    "Timer has Expired\n");
 			return -1;
 		}
-		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+		ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
 			    "Timer is Running\n");
 	}
 
-	PMD_DRV_LOG(INFO,
+	ARK_PMD_LOG(DEBUG,
 		    "HW Sanity test has PASSED, expected constant"
 		    " 0x%x, read 0x%x (%s)\n",
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocated memory for storing mac address"
 			    );
 	}
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		ark->user_data[dev->data->port_id] =
 			ark->user_ext.dev_init(dev, ark->a_bar, 0);
 		if (!ark->user_data[dev->data->port_id]) {
-			PMD_DRV_LOG(INFO,
+			ARK_PMD_LOG(WARNING,
 				    "Failed to initialize PMD extension!"
 				    " continuing without it\n");
 			memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	if (pci_dev->device.devargs)
 		ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
 	else
-		PMD_DRV_LOG(INFO, "No Device args found\n");
+		ARK_PMD_LOG(INFO, "No Device args found\n");
 
 	if (ret)
 		goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		/* reserve an ethdev entry */
 		eth_dev = rte_eth_dev_allocate(name);
 		if (!eth_dev) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Could not allocate eth_dev for port %d\n",
 				    p);
 			goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		eth_dev->data->mac_addrs = rte_zmalloc(name,
 						RTE_ETHER_ADDR_LEN, 0);
 		if (!eth_dev->data->mac_addrs) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Memory allocation for MAC failed!"
 				    " Exiting.\n");
 			goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* UDM */
 	if (ark_udm_reset(ark->udm.v)) {
-		PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
 		return -1;
 	}
 	/* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* TX -- DDM */
 	if (ark_ddm_stop(ark->ddm.v, 1))
-		PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
 	mpu = ark->mputx.v;
 	num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-	PMD_FUNC_LOG(DEBUG, "\n");
 	struct ark_adapter *ark = dev->data->dev_private;
 
 	eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	int i;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	/* RX Side */
 	/* start UDM */
 	ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		 * This is only used for sanity checking with internal generator
 		 */
 		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-			PMD_DRV_LOG(ERR, "Could not create pktgen "
+			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
 		}
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	struct ark_mpu_t *mpu;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	if (ark->started == 0)
 		return;
 	ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
 			uint16_t port = dev->data->port_id;
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
 				    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+		ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
 			    " %d iter: %u. (%s)\n",
 			    status,
 			    i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+		ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
 			    status, i, __func__);
 		ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-	PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+	ARK_PMD_LOG(DEBUG, "link status = %d\n",
 			dev->data->dev_link.link_status);
 	struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
 		   void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	struct ark_adapter *ark =
 		(struct ark_adapter *)extra_args;
 
 	ark->pkt_dir_v = strtol(value, NULL, 16);
-	PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
 	return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	int first = 1;
 
 	if (file == NULL) {
-		PMD_DRV_LOG(ERR, "Unable to open "
+		ARK_PMD_LOG(ERR, "Unable to open "
 			    "config file %s\n", value);
 		return -1;
 	}
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	while (fgets(line, sizeof(line), file)) {
 		size += strlen(line);
 		if (size >= ARK_MAX_ARG_LEN) {
-			PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+			ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
 				    "parameter list is too long\n", value);
 			fclose(file);
 			return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 			strncat(args, line, ARK_MAX_ARG_LEN);
 		}
 	}
-	PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+	ARK_PMD_LOG(DEBUG, "file = %s\n", args);
 	fclose(file);
 	return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
 	for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
 		pair = &kvlist->pairs[k_idx];
-		PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+		ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
 			     pair->key,
 			     pair->value);
 	}
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTDIR_ARG,
 			       &process_pktdir_arg,
 			       ark) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
 		goto free_kvlist;
 	}
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTGEN_ARG,
 			       &process_file_args,
 			       ark->pkt_gen_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
 		goto free_kvlist;
 	}
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTCHKR_ARG,
 			       &process_file_args,
 			       ark->pkt_chkr_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
 		goto free_kvlist;
 	}
 
-	PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
 	/* Setup the packet director */
 	ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
 	/* Setup the packet generator */
 	if (ark->pkt_gen_args[0]) {
-		PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+		ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
 		ark_pktgen_parse(ark->pkt_gen_args);
 		ark_pktgen_reset(ark->pg);
 		ark_pktgen_setup(ark->pg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 4d518d558..2f8d05099 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
 	/* Verify HW */
 	if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-		PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+		ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
 		return -1;
 	}
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 	if (rx_conf != NULL && warning1 == 0) {
 		warning1 = 1;
-		PMD_DRV_LOG(INFO,
+		ARK_PMD_LOG(NOTICE,
 			    "Arkville ignores rte_eth_rxconf argument.\n");
 	}
 
 	if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
 			    ARK_RX_META_SIZE, __func__);
 		return -1;		/* ERROR CODE */
 	}
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
 			    nb_desc, __func__);
 		return -1;		/* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+		ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
 		return -ENOMEM;
 	}
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocate queue memory in %s\n",
 			    __func__);
 		rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	status = eth_ark_rx_seed_mbufs(queue);
 
 	if (queue->seed_index != nb_desc) {
-		PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+		ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
 			    nb_desc, qidx);
 		status = -1;
 	}
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (unlikely(status != 0)) {
 		struct rte_mbuf **mbuf;
 
-		PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+		ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
 			    qidx,
 			    __func__);
 		/* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
 		mbuf->timestamp = meta->timestamp;
 		mbuf->udata64 = meta->user_data;
 
-		if (ARK_RX_DEBUG) {	/* debug sanity checks */
+		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
 			    (meta->pkt_len == 0)) {
-				PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+				ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
 					   " cons: %" PRIU32
 					   " prod: %" PRIU32
 					   " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
 					   queue->seed_index);
 
 
-				PMD_RX_LOG(DEBUG, "       :  UDM"
+				ARK_PMD_LOG(DEBUG, "       :  UDM"
 					   " prod: %" PRIU32
 					   " len: %u\n",
 					   queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 		mbuf_prev = mbuf;
 		mbuf->data_len = data_len;
 		mbuf->data_off = 0;
-		if (ARK_RX_DEBUG)
+		if (ARK_DEBUG_CORE)
 			mbuf->seqn = cons_index;	/* for debug only */
 
 		cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 		}
 	}
 
-	if (ARK_RX_DEBUG) {		/* DEBUG */
+	if (ARK_DEBUG_CORE) {		/* DEBUG */
 		while (count != nb) {
 			struct rte_mbuf *mbuf_init =
 				queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
 	*pnb = 64U;
 	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
 	if (status != 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(NOTICE,
 			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
 			    " %u free buffers remaining in queue\n",
 			    *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
 	if (!ark_udm_is_flushed(ark->udm.v)) {
 		/* restart the MPUs */
-		PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+		ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
 			if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 		/* Wait to allow data to pass */
 		usleep(100);
 
-		PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+		ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
 				ark_udm_is_flushed(ark->udm.v));
 	}
 	ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
 	if (queue == NULL)
 		return;
-	PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-	PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+	ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+	ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
 			"queue_size", queue->queue_size,
 			"seed_index", queue->seed_index,
 			"prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
 	uint16_t i, j;
 
-	PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-		mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+	ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+		    mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
 	for (i = lo; i < hi; i += 16) {
 		uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-		PMD_DRV_LOG(INFO, "  %6d:  ", i);
+		ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
 		for (j = 0; j < 16; j++)
-			PMD_DRV_LOG(INFO, " %02x", dp[j]);
+			ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-		PMD_DRV_LOG(INFO, "\n");
+		ARK_PMD_LOG(DEBUG, "\n");
 	}
 }
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 289668774..72624deb3 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 	}
 
-	if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-		PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+	if (ARK_DEBUG_CORE && nb != nb_pkts) {
+		ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
 			   " req: %" PRIU32
 			   " sent: %" PRIU32
 			   " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 	int qidx = queue_idx;
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size"
 			    " must be power of two %u (%s)\n",
 			    nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate tx "
+		ARK_PMD_LOG(ERR, "Failed to allocate tx "
 			    "queue memory in %s\n",
 			    __func__);
 		return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->meta_q == 0 || queue->bufs == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate "
+		ARK_PMD_LOG(ERR, "Failed to allocate "
 			    "queue memory in %s\n", __func__);
 		rte_free(queue->meta_q);
 		rte_free(queue->bufs);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..c3d7e7d39 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -28,66 +28,15 @@
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)	\
-	rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)			\
-	do {							\
-		if (0)						\
-			PMD_DRV_LOG(level, fmt, ## args);	\
-	} while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)				\
-	do {								\
-		if (0)							\
-			PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-	} while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 21f840f3c..8160c1de7 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 	if ((mpu->id.idnum != 0x2055504d) ||
 	    (mpu->hw.obj_size != obj_size) ||
 	    (version != 0x00003100)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU module not found as expected %08x"
 			    " \"%c%c%c%c %c%c%c%c\"\n",
 			    mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 			    mpu->id.id[2], mpu->id.id[3],
 			    mpu->id.ver[0], mpu->id.ver[1],
 			    mpu->id.ver[2], mpu->id.ver[3]);
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU HW num_queues: %u hw_depth %u,"
 			    " obj_size: %u, obj_per_mrr: %u"
 			    " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
 	ark_mpu_reset(mpu);
 
 	if (!rte_is_power_of_2(ring_size)) {
-		PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+		ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
 			    ring_size);
 		return -1;
 	}
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
 	/* DUMP to see that we have started */
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
 		      code, qid,
 		      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-		      " data 0x%08x_%08x 0x%08x_%08x\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+		      "\n",
 		      code,
 		      mpu->debug.state, mpu->debug.count,
-		      mpu->debug.reserved,
-		      mpu->debug.peek[1],
-		      mpu->debug.peek[0],
-		      mpu->debug.peek[3],
-		      mpu->debug.peek[2]
-		      );
-	PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-		      ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-		      code, qid,
-		      "PCI Request:", mpu->stats.pci_request,
-		      "Queue_empty", mpu->stats.q_empty,
-		      "Queue_q1", mpu->stats.q_q1,
-		      "Queue_q2", mpu->stats.q_q2,
-		      "Queue_q3", mpu->stats.q_q3,
-		      "Queue_q4", mpu->stats.q_q4,
-		      "Queue_full", mpu->stats.q_full
+		      mpu->debug.reserved
 		      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
 		      ARK_SU64X "\n",
 		      q_id,
 		      "ring_base", mpu->cfg.ring_base
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index ef861eea3..b8fb69497 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_chkr_inst",
 			   sizeof(struct ark_pkt_chkr_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
 		return inst;
 	}
 	inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+		ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
 	if (ark_pktchkr_is_gen_forever(handle)) {
-		PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
 			      " because gen_forever=1\n");
 		return -1;
 	}
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+		ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
 			      " internal pktgen to finish sending...\n",
 			      inst->ordinal);
-		PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+		ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
 			      inst->ordinal);
 	}
 	return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-	PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
 		      inst->sregs->pkts_rcvd);
-	PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+	ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
 		      inst->sregs->bytes_rcvd);
-	PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
 		      inst->sregs->pkts_ok);
-	PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
 		      inst->sregs->pkts_mismatch);
-	PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
 		      inst->sregs->pkts_err);
-	PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+	ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
 		      inst->sregs->first_mismatch);
-	PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
 		      inst->sregs->resync_events);
-	PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
 		      inst->sregs->pkts_missing);
-	PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
 		      inst->sregs->min_latency);
-	PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
 		      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
 		if (strcmp(id, toptions[i].opt) == 0)
 			return &toptions[i];
 	}
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "pktchkr: Could not find requested option!, option = %s\n",
 		    id);
 	return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
 		ark_pktchkr_stop(handle);
 
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
 			      options("port")->v.INT);
 		ark_pktchkr_run(handle);
 	}
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 1f2c8182a..25e121831 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
 			   sizeof(struct ark_pkt_dir_inst),
 			   0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index 2cae252d6..4a02662a4 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_gen_inst_pmd",
 			   sizeof(struct ark_pkt_gen_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
 	while (!ark_pktgen_paused(handle)) {
 		usleep(1000);
 		if (cnt++ > 100) {
-			PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+			ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
 				    inst->ordinal);
 			break;
 		}
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (!ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+		ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
 			      " and is not paused. No need to reset.\n",
 			      inst->ordinal);
 		return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Pktgen %d is not paused. Pausing first.\n",
 			      inst->ordinal);
 		ark_pktgen_pause(handle);
 	}
 
-	PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
 	inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
 	int wait_cycle = 10;
 
 	if (ark_pktgen_is_gen_forever(handle))
-		PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
 			    " because gen_forever=1\n");
 
 	while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Waiting for pktgen %d to finish sending...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
 			return &toptions[i];
 	}
 
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "Pktgen: Could not find requested option!, "
 		    "option = %s\n",
 		    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
 	if (options("reset")->v.BOOL)
 		ark_pktgen_reset(handle);
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
 				options("port")->v.INT);
 		ark_pktgen_run(handle);
 	}
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index bf1af4d61..ef9ccd070 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
 	if (rqp->err_count_other != 0)
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
 			    ARK_SU32
 			    ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
 			    "Error Count", rqp->err_cnt,
 			    "Error General", rqp->err_count_other);
 
-	PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+	ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
 		      ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 03f1922c6..a740d36d4 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
 	if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM structure looks incorrect %d vs %zd\n",
 			    ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
 		return -1;
 	}
 
 	if (udm->setup.const0 != ARK_UDM_CONST) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM module not found as expected 0x%08x\n",
 			    udm->setup.const0);
 		return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
 	status = ark_udm_stop(udm, 1);
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		udm->cfg.command = 4;
 		usleep(10);
 		udm->cfg.command = 3;
 		status = ark_udm_stop(udm, 0);
-		PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+		ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
 			      " and forced reset\n",
 			      __func__, status);
 	} else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_STATS_LOG(INFO, "UDM Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
 		      msg,
 		      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-	PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
 		      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
 		      ARK_SU64X ARK_SU32 "\n",
 		      q_id,
 		      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
 	struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-	PMD_STATS_LOG(INFO, "UDM Performance %s"
+	ARK_PMD_LOG(INFO, "UDM Performance %s"
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      "\n",
 		      msg,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro
  2020-08-20 21:55 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-08-20 21:55   ` Ed Czeck
  2020-08-21  9:50     ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-20 21:55 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Update documenation as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         |  3 ---
 drivers/net/ark/ark_ethdev_tx.c | 42 ++++++++++++++++++---------------
 drivers/net/ark/ark_logs.h      |  8 -------
 3 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index c3ffcbbc2..0f96ebd2c 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -129,9 +129,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
      of the ARK PMD driver in the DPDK compilation.
 
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 72624deb3..c303ac58c 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -15,6 +15,11 @@
 #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
 
 
+#ifndef ARK_MIN_TX_PKTLEN
+#define ARK_MIN_TX_PKTLEN 0
+#endif
+
+
 /* ************************************************************************* */
 struct ark_tx_queue {
 	struct ark_tx_meta *meta_q;
@@ -91,6 +96,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint32_t prod_index_limit;
 	int stat;
 	uint16_t nb;
+	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
 
 	queue = (struct ark_tx_queue *)vtxq;
 
@@ -104,27 +110,25 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
-		if (ARK_TX_PAD_TO_60) {
-			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
-				/* this packet even if it is small can be split,
-				 * be sure to add to the end mbuf
+		if (unlikely(rte_pktmbuf_pkt_len(mbuf) < min_pkt_len)) {
+			/* this packet even if it is small can be split,
+			 * be sure to add to the end mbuf
+			 */
+			uint16_t to_add = min_pkt_len -
+				rte_pktmbuf_pkt_len(mbuf);
+			char *appended =
+				rte_pktmbuf_append(mbuf, to_add);
+
+			if (appended == 0) {
+				/* This packet is in error,
+				 * we cannot send it so just
+				 * count it and delete it.
 				 */
-				uint16_t to_add =
-					60 - rte_pktmbuf_pkt_len(mbuf);
-				char *appended =
-					rte_pktmbuf_append(mbuf, to_add);
-
-				if (appended == 0) {
-					/* This packet is in error,
-					 * we cannot send it so just
-					 * count it and delete it.
-					 */
-					queue->tx_errors += 1;
-					rte_pktmbuf_free(mbuf);
-					continue;
-				}
-				memset(appended, 0, to_add);
+				queue->tx_errors += 1;
+				rte_pktmbuf_free(mbuf);
+				continue;
 			}
+			memset(appended, 0, to_add);
 		}
 
 		if (unlikely(mbuf->nb_segs != 1)) {
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index c3d7e7d39..ca46d86c9 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -8,14 +8,6 @@
 #include <inttypes.h>
 #include <rte_log.h>
 
-
-/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
-#define ARK_TX_PAD_TO_60   0
-#endif
-
 /* system camel case definition changed to upper case */
 #define PRIU32 PRIu32
 #define PRIU64 PRIu64
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ark: fix meson build
  2020-08-20 15:41     ` Ed Czeck
@ 2020-08-21  9:44       ` Ferruh Yigit
  0 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-21  9:44 UTC (permalink / raw)
  To: Ed Czeck; +Cc: dev, Richardson, Bruce, Shepard Siegel, John Miller

On 8/20/2020 4:41 PM, Ed Czeck wrote:
> On Thu, Aug 20, 2020 at 7:16 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
> ...
>>
>> Logging can be controlled in runtime, that is what we should use.
>> In data path, we use compile time flags because of the performance issues. So OK
>> to have 'CONFIG_RTE_LIBRTE_ARK_DEBUG_RX' & 'CONFIG_RTE_LIBRTE_ARK_DEBUG_TX' as
>> compile time flag, but why having compile time flag for rest?
> 
> Agreed.  We'll remove most of these macro in the next commit pushing
> the behavior
> into run-time log control.
> 
>>>
>>> +Note that enabling debugging options may affect system performance.
>>> +These options may be set by specifying them in CFLAG
>>> +environment before the meson build set.   E.g.::
>>> +
>>> +    export CFLAGS="-DARK_DEBUG_TRACE"
>>> +    meson build
>>> +
>>
>> When you passed the flag as above, it is still global to all components in the
>> DPDK, this is not just for ark. What is the motivation to remove the
>> "RET_LIBRTE_" prefix?
> 
> There are 2 issues here.
> 1) With the makefile flow, users could add other configurations with
> the documented
> and recommended sed commands.  I.e.,
> sed -ri 's/(CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE)=n/\1=y/' build/.config
> The makefiles took care of everything from there.  This no longer works with the
> meson build flow.  The solution is to set that macro passing it in the
> CFLAG environment.
> We're open to other recommendations.

Yes compile time flags are harder to use with meson build system, and this is
kind of intentional because of above mentioned reasons.

It is possible to add compile time option as meson config option if we must, but
that is not suggested, the intention is get rid of compile time flags as much as
we can, and we were already very picky to accept new compile time flags to make
build for some time.

> 2) Is there an advantage of promoting a PMD macro to a global macro?
> It seems to add to the noise of dpdk configuration and there are many
> PMD specific macros throughout the code base.

If CFLAG used to pass macros to multiple components, or if there is a bigger
build environment that builds both application and DPDK, CFLAGS is common flag
and I think better to keep the DPDK namespace for DPDK macros. At least let me
say the way that I don't see the motivation to remove the DPDK namespace from
macros.

> 
>>
>>>
>>>  Building DPDK
>>>  -------------
>>> diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
>>> index 44aac6102..125583475 100644
>>> --- a/drivers/net/ark/ark_logs.h
>>> +++ b/drivers/net/ark/ark_logs.h
>>> @@ -6,14 +6,12 @@
>>>  #define _ARK_DEBUG_H_
>>>
>>>  #include <inttypes.h>
>>> -#include <rte_log.h>
>>> -
>>>
>>>  /* Configuration option to pad TX packets to 60 bytes */
>>> -#ifdef RTE_LIBRTE_ARK_PAD_TX
>>> -#define ARK_TX_PAD_TO_60   1
>>> -#else
>>> +#ifdef ARK_NOPAD_TX
>>>  #define ARK_TX_PAD_TO_60   0
>>> +#else
>>> +#define ARK_TX_PAD_TO_60   1
>>>  #endif
>>
>> So you don't want to convert this to runtime configuration.
>>
>> The point we are reducing compile time flags:
>> 1) It forks the code paths and by time it leave not tested, even not compiled
>> code paths which may cause rotten code by time.
>>
>> 2) Multiple code paths will lead deployment problems. When you deploy an
>> application, you won't able to change the compile time configuration in customer
>> environment and need to re-compile (most probably re-test) and re-deploy it.
>> Also there is not easy way to figure out from binary in customer environment
>> that with which compile time flags it has been built.
>>
>> Switching to CFLAGS="..." doesn't make above concerns go away and indeed it
>> makes (1) worst since hides the config options within the driver. Previously it
>> was possible to trigger each config option and do testing using scripts, now
>> since config options are hidden in driver we can't do even that.
>>
>> Can you please detail why "ARK_TX_PAD_TO_60" is needed exactly?
>> And can you please justify why it has to be compile time config option?
>>
> The need to pad packets is dependent on the underlying FPGA hardware
> implementation which lies outside the control of our deliverables.  Thus we
> leave control up to our customer and how they deliver and deploy DPDK.  This
> needs to be a compile-time macro since the code executes within the
> per-packet processing under rte_eth_tx_burst().

It is still possible to use runtime config by having two burst functions, one
with padding and without padding support, which is selected based on provided
runtime flag. Runtime parameter can provide the padding size.
But agree that adds more complexity.

> 
> We can change the macro to ARK_MIN_TX_PKTLEN, which should have zero
> overhead when set to 0.  (I'm assuming that compiles will remove if
> (unsigned < 0) blocks.)  Should this be an RTE_LIBRTE macro?  How does
> a user change this during compile?
> 
>> <...>
>>
>>> @@ -11,3 +11,5 @@ sources = files('ark_ddm.c',
>>>       'ark_pktgen.c',
>>>       'ark_rqp.c',
>>>       'ark_udm.c')
>>> +
>>> +install_headers('ark_ext.h')
>>>
>>
>> Installing PMD header file is not required but this has an unique usage.
>>
>> Ark PMD is wrapper to the external shared library which should implement the
>> functions that has prototypes in the 'ark_ext.h'.
>>
>> Since this header is not needed by users of the dpdk library, but needed by
>> extension developers for the ark PMD, I think the header should not be installed.
> 
> So is your recommendation that anyone developing an ark pmd extension
> must have access to DPDK source, in addition to the installed code?
> It seems like one include location is better than two.
> 

Yes.
I understand it makes PMD extension developer's life easy to have 'ark_ext.h'
installed in system folders but I think it doesn't fit there.

DPDK public headers are for application developers to use the DPDK APIs.
'ark_ext.h' is used by PMD developer to build PMD extension which is indeed can
be taken as developing DPDK internal component.

And if I understand correctly the a PMD extension is required per a bitstream
for a Arkville device, so not really many developers affected from it.

(Also the name prefix and the namespace of the symbols in the header is not
suitable to be a public header, but this is something else.)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro
  2020-08-20 21:55   ` [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro Ed Czeck
@ 2020-08-21  9:50     ` Ferruh Yigit
  0 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-21  9:50 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/20/2020 10:55 PM, Ed Czeck wrote:
> Update documenation as needed.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  doc/guides/nics/ark.rst         |  3 ---
>  drivers/net/ark/ark_ethdev_tx.c | 42 ++++++++++++++++++---------------
>  drivers/net/ark/ark_logs.h      |  8 -------
>  3 files changed, 23 insertions(+), 30 deletions(-)
> 
> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> index c3ffcbbc2..0f96ebd2c 100644
> --- a/doc/guides/nics/ark.rst
> +++ b/doc/guides/nics/ark.rst
> @@ -129,9 +129,6 @@ Configuration Information
>     * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
>       of the ARK PMD driver in the DPDK compilation.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> -     packets are padded to 60 bytes to support downstream MACS.
> -

It may be useful to document what replaced it and how to use it:

    export CFLAGS="-DARK_MIN_TX_PKTLEN=60"
    meson build

And as mention in reply to prev version, I think better to keep 'RTE_LIBRTE_',
as 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN'

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
                   ` (2 preceding siblings ...)
  2020-08-20 21:55 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-08-24 13:36 ` Ed Czeck
  2020-08-24 13:36   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
  2020-08-24 14:37   ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
  2020-08-26 15:24 ` Ed Czeck
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 27+ messages in thread
From: Ed Czeck @ 2020-08-24 13:36 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ------
 drivers/net/ark/ark_ddm.c       | 12 ++---
 drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
 drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
 drivers/net/ark/ark_ethdev_tx.c | 10 ++---
 drivers/net/ark/ark_logs.h      | 63 +++------------------------
 drivers/net/ark/ark_mpu.c       | 32 ++++----------
 drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
 drivers/net/ark/ark_pktdir.c    |  2 +-
 drivers/net/ark/ark_pktgen.c    | 22 +++++-----
 drivers/net/ark/ark_rqp.c       |  4 +-
 drivers/net/ark/ark_udm.c       | 18 ++++----
 12 files changed, 125 insertions(+), 210 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..c3ffcbbc2 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 57026f8d1..91d1179d8 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
 	uint32_t hw_const;
 	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-		PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+		ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
 			    ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
 		return -1;
 	}
 
 	hw_const = ddm->cfg.const0;
 	if (hw_const == ARK_DDM_CONST1) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module is version 1, "
 			    "PMD expects version 2\n");
 		return -1;
 	} else if (hw_const != ARK_DDM_CONST2) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module not found as expected 0x%08x\n",
 			    ddm->cfg.const0);
 		return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
 	status = ark_ddm_stop(ddm, 1);
 
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		ddm->cfg.command = 4;
 		usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-	PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
 		     ark_ddm_is_stopped(ddm)
 		     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
 	struct ark_ddm_stats_t *stats = &ddm->stats;
 
-	PMD_STATS_LOG(INFO, "DDM Stats: %s"
+	ARK_PMD_LOG(INFO, "DDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64
 		      "\n", msg,
 		      "Bytes:", stats->tx_byte_count,
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd867..646427d0c 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
 	const char *dllpath = getenv("ARK_EXT_PATH");
 
 	if (dllpath == NULL) {
-		PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+		ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
 		return 0;
 	}
-	PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+	ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
 	/* Open and load the .so */
 	ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
 	if (ark->d_handle == NULL) {
-		PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+		ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
 			    dllpath);
 		return -1;
 	}
-	PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+	ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
 			    dllpath);
 
 	/* Get the entry points */
 	ark->user_ext.dev_init =
 		(void *(*)(struct rte_eth_dev *, void *, int))
 		dlsym(ark->d_handle, "dev_init");
-	PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+	ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
 		      ark->user_ext.dev_init);
 	ark->user_ext.dev_get_port_count =
 		(int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	ark->eth_dev = dev;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
+	ARK_PMD_LOG(DEBUG, "\n");
 
 	/* Check to see if there is an extension that we need to load */
 	ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
 
-	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
 		      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-	PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
 		    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
 	/* If HW sanity test fails, return an error */
 	if (ark->sysctrl.t32[4] != 0xcafef00d) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "HW Sanity test has failed, expected constant"
 			    " 0x%x, read 0x%x (%s)\n",
 			    0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	}
 	if (ark->sysctrl.t32[3] != 0) {
 		if (ark_rqp_lasped(ark->rqpacing)) {
-			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+			ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
 				    "Timer has Expired\n");
 			return -1;
 		}
-		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+		ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
 			    "Timer is Running\n");
 	}
 
-	PMD_DRV_LOG(INFO,
+	ARK_PMD_LOG(DEBUG,
 		    "HW Sanity test has PASSED, expected constant"
 		    " 0x%x, read 0x%x (%s)\n",
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocated memory for storing mac address"
 			    );
 	}
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		ark->user_data[dev->data->port_id] =
 			ark->user_ext.dev_init(dev, ark->a_bar, 0);
 		if (!ark->user_data[dev->data->port_id]) {
-			PMD_DRV_LOG(INFO,
+			ARK_PMD_LOG(WARNING,
 				    "Failed to initialize PMD extension!"
 				    " continuing without it\n");
 			memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	if (pci_dev->device.devargs)
 		ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
 	else
-		PMD_DRV_LOG(INFO, "No Device args found\n");
+		ARK_PMD_LOG(INFO, "No Device args found\n");
 
 	if (ret)
 		goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		/* reserve an ethdev entry */
 		eth_dev = rte_eth_dev_allocate(name);
 		if (!eth_dev) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Could not allocate eth_dev for port %d\n",
 				    p);
 			goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		eth_dev->data->mac_addrs = rte_zmalloc(name,
 						RTE_ETHER_ADDR_LEN, 0);
 		if (!eth_dev->data->mac_addrs) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Memory allocation for MAC failed!"
 				    " Exiting.\n");
 			goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* UDM */
 	if (ark_udm_reset(ark->udm.v)) {
-		PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
 		return -1;
 	}
 	/* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* TX -- DDM */
 	if (ark_ddm_stop(ark->ddm.v, 1))
-		PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
 	mpu = ark->mputx.v;
 	num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-	PMD_FUNC_LOG(DEBUG, "\n");
 	struct ark_adapter *ark = dev->data->dev_private;
 
 	eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	int i;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	/* RX Side */
 	/* start UDM */
 	ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		 * This is only used for sanity checking with internal generator
 		 */
 		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-			PMD_DRV_LOG(ERR, "Could not create pktgen "
+			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
 		}
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	struct ark_mpu_t *mpu;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	if (ark->started == 0)
 		return;
 	ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
 			uint16_t port = dev->data->port_id;
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
 				    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+		ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
 			    " %d iter: %u. (%s)\n",
 			    status,
 			    i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+		ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
 			    status, i, __func__);
 		ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-	PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+	ARK_PMD_LOG(DEBUG, "link status = %d\n",
 			dev->data->dev_link.link_status);
 	struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
 		   void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	struct ark_adapter *ark =
 		(struct ark_adapter *)extra_args;
 
 	ark->pkt_dir_v = strtol(value, NULL, 16);
-	PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
 	return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	int first = 1;
 
 	if (file == NULL) {
-		PMD_DRV_LOG(ERR, "Unable to open "
+		ARK_PMD_LOG(ERR, "Unable to open "
 			    "config file %s\n", value);
 		return -1;
 	}
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	while (fgets(line, sizeof(line), file)) {
 		size += strlen(line);
 		if (size >= ARK_MAX_ARG_LEN) {
-			PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+			ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
 				    "parameter list is too long\n", value);
 			fclose(file);
 			return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 			strncat(args, line, ARK_MAX_ARG_LEN);
 		}
 	}
-	PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+	ARK_PMD_LOG(DEBUG, "file = %s\n", args);
 	fclose(file);
 	return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
 	for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
 		pair = &kvlist->pairs[k_idx];
-		PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+		ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
 			     pair->key,
 			     pair->value);
 	}
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTDIR_ARG,
 			       &process_pktdir_arg,
 			       ark) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
 		goto free_kvlist;
 	}
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTGEN_ARG,
 			       &process_file_args,
 			       ark->pkt_gen_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
 		goto free_kvlist;
 	}
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTCHKR_ARG,
 			       &process_file_args,
 			       ark->pkt_chkr_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
 		goto free_kvlist;
 	}
 
-	PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
 	/* Setup the packet director */
 	ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
 	/* Setup the packet generator */
 	if (ark->pkt_gen_args[0]) {
-		PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+		ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
 		ark_pktgen_parse(ark->pkt_gen_args);
 		ark_pktgen_reset(ark->pg);
 		ark_pktgen_setup(ark->pg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 4d518d558..2f8d05099 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
 	/* Verify HW */
 	if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-		PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+		ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
 		return -1;
 	}
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 	if (rx_conf != NULL && warning1 == 0) {
 		warning1 = 1;
-		PMD_DRV_LOG(INFO,
+		ARK_PMD_LOG(NOTICE,
 			    "Arkville ignores rte_eth_rxconf argument.\n");
 	}
 
 	if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
 			    ARK_RX_META_SIZE, __func__);
 		return -1;		/* ERROR CODE */
 	}
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
 			    nb_desc, __func__);
 		return -1;		/* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+		ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
 		return -ENOMEM;
 	}
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocate queue memory in %s\n",
 			    __func__);
 		rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	status = eth_ark_rx_seed_mbufs(queue);
 
 	if (queue->seed_index != nb_desc) {
-		PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+		ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
 			    nb_desc, qidx);
 		status = -1;
 	}
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (unlikely(status != 0)) {
 		struct rte_mbuf **mbuf;
 
-		PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+		ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
 			    qidx,
 			    __func__);
 		/* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
 		mbuf->timestamp = meta->timestamp;
 		mbuf->udata64 = meta->user_data;
 
-		if (ARK_RX_DEBUG) {	/* debug sanity checks */
+		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
 			    (meta->pkt_len == 0)) {
-				PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+				ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
 					   " cons: %" PRIU32
 					   " prod: %" PRIU32
 					   " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
 					   queue->seed_index);
 
 
-				PMD_RX_LOG(DEBUG, "       :  UDM"
+				ARK_PMD_LOG(DEBUG, "       :  UDM"
 					   " prod: %" PRIU32
 					   " len: %u\n",
 					   queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 		mbuf_prev = mbuf;
 		mbuf->data_len = data_len;
 		mbuf->data_off = 0;
-		if (ARK_RX_DEBUG)
+		if (ARK_DEBUG_CORE)
 			mbuf->seqn = cons_index;	/* for debug only */
 
 		cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 		}
 	}
 
-	if (ARK_RX_DEBUG) {		/* DEBUG */
+	if (ARK_DEBUG_CORE) {		/* DEBUG */
 		while (count != nb) {
 			struct rte_mbuf *mbuf_init =
 				queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
 	*pnb = 64U;
 	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
 	if (status != 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(NOTICE,
 			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
 			    " %u free buffers remaining in queue\n",
 			    *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
 	if (!ark_udm_is_flushed(ark->udm.v)) {
 		/* restart the MPUs */
-		PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+		ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
 			if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 		/* Wait to allow data to pass */
 		usleep(100);
 
-		PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+		ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
 				ark_udm_is_flushed(ark->udm.v));
 	}
 	ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
 	if (queue == NULL)
 		return;
-	PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-	PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+	ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+	ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
 			"queue_size", queue->queue_size,
 			"seed_index", queue->seed_index,
 			"prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
 	uint16_t i, j;
 
-	PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-		mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+	ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+		    mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
 	for (i = lo; i < hi; i += 16) {
 		uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-		PMD_DRV_LOG(INFO, "  %6d:  ", i);
+		ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
 		for (j = 0; j < 16; j++)
-			PMD_DRV_LOG(INFO, " %02x", dp[j]);
+			ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-		PMD_DRV_LOG(INFO, "\n");
+		ARK_PMD_LOG(DEBUG, "\n");
 	}
 }
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 289668774..72624deb3 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 	}
 
-	if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-		PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+	if (ARK_DEBUG_CORE && nb != nb_pkts) {
+		ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
 			   " req: %" PRIU32
 			   " sent: %" PRIU32
 			   " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 	int qidx = queue_idx;
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size"
 			    " must be power of two %u (%s)\n",
 			    nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate tx "
+		ARK_PMD_LOG(ERR, "Failed to allocate tx "
 			    "queue memory in %s\n",
 			    __func__);
 		return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->meta_q == 0 || queue->bufs == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate "
+		ARK_PMD_LOG(ERR, "Failed to allocate "
 			    "queue memory in %s\n", __func__);
 		rte_free(queue->meta_q);
 		rte_free(queue->bufs);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..c3d7e7d39 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -28,66 +28,15 @@
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)	\
-	rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)			\
-	do {							\
-		if (0)						\
-			PMD_DRV_LOG(level, fmt, ## args);	\
-	} while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)				\
-	do {								\
-		if (0)							\
-			PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-	} while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 21f840f3c..8160c1de7 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 	if ((mpu->id.idnum != 0x2055504d) ||
 	    (mpu->hw.obj_size != obj_size) ||
 	    (version != 0x00003100)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU module not found as expected %08x"
 			    " \"%c%c%c%c %c%c%c%c\"\n",
 			    mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 			    mpu->id.id[2], mpu->id.id[3],
 			    mpu->id.ver[0], mpu->id.ver[1],
 			    mpu->id.ver[2], mpu->id.ver[3]);
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU HW num_queues: %u hw_depth %u,"
 			    " obj_size: %u, obj_per_mrr: %u"
 			    " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
 	ark_mpu_reset(mpu);
 
 	if (!rte_is_power_of_2(ring_size)) {
-		PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+		ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
 			    ring_size);
 		return -1;
 	}
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
 	/* DUMP to see that we have started */
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
 		      code, qid,
 		      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-		      " data 0x%08x_%08x 0x%08x_%08x\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+		      "\n",
 		      code,
 		      mpu->debug.state, mpu->debug.count,
-		      mpu->debug.reserved,
-		      mpu->debug.peek[1],
-		      mpu->debug.peek[0],
-		      mpu->debug.peek[3],
-		      mpu->debug.peek[2]
-		      );
-	PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-		      ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-		      code, qid,
-		      "PCI Request:", mpu->stats.pci_request,
-		      "Queue_empty", mpu->stats.q_empty,
-		      "Queue_q1", mpu->stats.q_q1,
-		      "Queue_q2", mpu->stats.q_q2,
-		      "Queue_q3", mpu->stats.q_q3,
-		      "Queue_q4", mpu->stats.q_q4,
-		      "Queue_full", mpu->stats.q_full
+		      mpu->debug.reserved
 		      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
 		      ARK_SU64X "\n",
 		      q_id,
 		      "ring_base", mpu->cfg.ring_base
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index ef861eea3..b8fb69497 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_chkr_inst",
 			   sizeof(struct ark_pkt_chkr_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
 		return inst;
 	}
 	inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+		ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
 	if (ark_pktchkr_is_gen_forever(handle)) {
-		PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
 			      " because gen_forever=1\n");
 		return -1;
 	}
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+		ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
 			      " internal pktgen to finish sending...\n",
 			      inst->ordinal);
-		PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+		ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
 			      inst->ordinal);
 	}
 	return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-	PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
 		      inst->sregs->pkts_rcvd);
-	PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+	ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
 		      inst->sregs->bytes_rcvd);
-	PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
 		      inst->sregs->pkts_ok);
-	PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
 		      inst->sregs->pkts_mismatch);
-	PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
 		      inst->sregs->pkts_err);
-	PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+	ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
 		      inst->sregs->first_mismatch);
-	PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
 		      inst->sregs->resync_events);
-	PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
 		      inst->sregs->pkts_missing);
-	PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
 		      inst->sregs->min_latency);
-	PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
 		      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
 		if (strcmp(id, toptions[i].opt) == 0)
 			return &toptions[i];
 	}
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "pktchkr: Could not find requested option!, option = %s\n",
 		    id);
 	return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
 		ark_pktchkr_stop(handle);
 
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
 			      options("port")->v.INT);
 		ark_pktchkr_run(handle);
 	}
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 1f2c8182a..25e121831 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
 			   sizeof(struct ark_pkt_dir_inst),
 			   0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index 2cae252d6..4a02662a4 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_gen_inst_pmd",
 			   sizeof(struct ark_pkt_gen_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
 	while (!ark_pktgen_paused(handle)) {
 		usleep(1000);
 		if (cnt++ > 100) {
-			PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+			ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
 				    inst->ordinal);
 			break;
 		}
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (!ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+		ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
 			      " and is not paused. No need to reset.\n",
 			      inst->ordinal);
 		return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Pktgen %d is not paused. Pausing first.\n",
 			      inst->ordinal);
 		ark_pktgen_pause(handle);
 	}
 
-	PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
 	inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
 	int wait_cycle = 10;
 
 	if (ark_pktgen_is_gen_forever(handle))
-		PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
 			    " because gen_forever=1\n");
 
 	while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Waiting for pktgen %d to finish sending...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
 			return &toptions[i];
 	}
 
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "Pktgen: Could not find requested option!, "
 		    "option = %s\n",
 		    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
 	if (options("reset")->v.BOOL)
 		ark_pktgen_reset(handle);
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
 				options("port")->v.INT);
 		ark_pktgen_run(handle);
 	}
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index bf1af4d61..ef9ccd070 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
 	if (rqp->err_count_other != 0)
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
 			    ARK_SU32
 			    ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
 			    "Error Count", rqp->err_cnt,
 			    "Error General", rqp->err_count_other);
 
-	PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+	ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
 		      ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 03f1922c6..a740d36d4 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
 	if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM structure looks incorrect %d vs %zd\n",
 			    ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
 		return -1;
 	}
 
 	if (udm->setup.const0 != ARK_UDM_CONST) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM module not found as expected 0x%08x\n",
 			    udm->setup.const0);
 		return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
 	status = ark_udm_stop(udm, 1);
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		udm->cfg.command = 4;
 		usleep(10);
 		udm->cfg.command = 3;
 		status = ark_udm_stop(udm, 0);
-		PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+		ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
 			      " and forced reset\n",
 			      __func__, status);
 	} else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_STATS_LOG(INFO, "UDM Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
 		      msg,
 		      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-	PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
 		      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
 		      ARK_SU64X ARK_SU32 "\n",
 		      q_id,
 		      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
 	struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-	PMD_STATS_LOG(INFO, "UDM Performance %s"
+	ARK_PMD_LOG(INFO, "UDM Performance %s"
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      "\n",
 		      msg,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-08-24 13:36   ` Ed Czeck
  2020-08-24 14:55     ` Ferruh Yigit
  2020-08-24 14:37   ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
  1 sibling, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-24 13:36 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
with a default value of 0.
Update documentation as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ++++++++--
 drivers/net/ark/ark_ethdev_tx.c | 44 +++++++++++++++++++--------------
 drivers/net/ark/ark_logs.h      |  8 ------
 3 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index c3ffcbbc2..f4d4539e5 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -129,8 +129,10 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
      of the ARK PMD driver in the DPDK compilation.
 
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
+  * **CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
+    packet length for tx packets to the FPGA.  Packets less than this
+    length are padded to meet the requirement. This allows padding to
+    be offloaded or remain in host software.
 
 
 Building DPDK
@@ -144,6 +146,13 @@ By default the ARK PMD library will be built into the DPDK library.
 For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
 documentation that comes with DPDK suite <linux_gsg>`.
 
+To build with a non-zero minimum tx packet length, set the above macro in your
+CFLAGS environment prior to the meson build step. I.e.,
+
+    export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
+    meson build
+
+
 Supported ARK RTL PCIe Instances
 --------------------------------
 
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 72624deb3..d24d7ac21 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -15,6 +15,13 @@
 #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
 
 
+#ifndef RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#define ARK_MIN_TX_PKTLEN 0
+#else
+#define ARK_MIN_TX_PKTLEN RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#endif
+
+
 /* ************************************************************************* */
 struct ark_tx_queue {
 	struct ark_tx_meta *meta_q;
@@ -91,6 +98,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint32_t prod_index_limit;
 	int stat;
 	uint16_t nb;
+	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
 
 	queue = (struct ark_tx_queue *)vtxq;
 
@@ -104,27 +112,25 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
-		if (ARK_TX_PAD_TO_60) {
-			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
-				/* this packet even if it is small can be split,
-				 * be sure to add to the end mbuf
+		if (unlikely(rte_pktmbuf_pkt_len(mbuf) < min_pkt_len)) {
+			/* this packet even if it is small can be split,
+			 * be sure to add to the end mbuf
+			 */
+			uint16_t to_add = min_pkt_len -
+				rte_pktmbuf_pkt_len(mbuf);
+			char *appended =
+				rte_pktmbuf_append(mbuf, to_add);
+
+			if (appended == 0) {
+				/* This packet is in error,
+				 * we cannot send it so just
+				 * count it and delete it.
 				 */
-				uint16_t to_add =
-					60 - rte_pktmbuf_pkt_len(mbuf);
-				char *appended =
-					rte_pktmbuf_append(mbuf, to_add);
-
-				if (appended == 0) {
-					/* This packet is in error,
-					 * we cannot send it so just
-					 * count it and delete it.
-					 */
-					queue->tx_errors += 1;
-					rte_pktmbuf_free(mbuf);
-					continue;
-				}
-				memset(appended, 0, to_add);
+				queue->tx_errors += 1;
+				rte_pktmbuf_free(mbuf);
+				continue;
 			}
+			memset(appended, 0, to_add);
 		}
 
 		if (unlikely(mbuf->nb_segs != 1)) {
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index c3d7e7d39..ca46d86c9 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -8,14 +8,6 @@
 #include <inttypes.h>
 #include <rte_log.h>
 
-
-/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
-#define ARK_TX_PAD_TO_60   0
-#endif
-
 /* system camel case definition changed to upper case */
 #define PRIU32 PRIu32
 #define PRIU64 PRIu64
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
  2020-08-24 13:36   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
@ 2020-08-24 14:37   ` Ferruh Yigit
  2020-08-24 14:40     ` Bruce Richardson
  1 sibling, 1 reply; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-24 14:37 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/24/2020 2:36 PM, Ed Czeck wrote:
> Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
> PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
> Review and adjust log levels and messages as needed.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  doc/guides/nics/ark.rst         | 13 ------
>  drivers/net/ark/ark_ddm.c       | 12 ++---
>  drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
>  drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
>  drivers/net/ark/ark_ethdev_tx.c | 10 ++---
>  drivers/net/ark/ark_logs.h      | 63 +++------------------------
>  drivers/net/ark/ark_mpu.c       | 32 ++++----------
>  drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
>  drivers/net/ark/ark_pktdir.c    |  2 +-
>  drivers/net/ark/ark_pktgen.c    | 22 +++++-----
>  drivers/net/ark/ark_rqp.c       |  4 +-
>  drivers/net/ark/ark_udm.c       | 18 ++++----
>  12 files changed, 125 insertions(+), 210 deletions(-)
> 
> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> index 06e8c3374..c3ffcbbc2 100644
> --- a/doc/guides/nics/ark.rst
> +++ b/doc/guides/nics/ark.rst
> @@ -132,19 +132,6 @@ Configuration Information
>     * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
>       packets are padded to 60 bytes to support downstream MACS.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
> -     logging and internal checking of RX ingress logic within the ARK PMD driver.
> -
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
> -     logging and internal checking of TX egress logic within the ARK PMD driver.
> -
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
> -     logging of detailed packet and performance statistics gathered in
> -     the PMD and FPGA.
> -
> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
> -     logging of detailed PMD events and status.
> -

Can you please remove these config option from 'config/common_base'?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-24 14:37   ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
@ 2020-08-24 14:40     ` Bruce Richardson
  2020-08-24 15:09       ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Bruce Richardson @ 2020-08-24 14:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Ed Czeck, dev, shepard.siegel, john.miller

On Mon, Aug 24, 2020 at 03:37:53PM +0100, Ferruh Yigit wrote:
> On 8/24/2020 2:36 PM, Ed Czeck wrote:
> > Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
> > PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
> > Review and adjust log levels and messages as needed.
> > 
> > Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> > ---
> >  doc/guides/nics/ark.rst         | 13 ------
> >  drivers/net/ark/ark_ddm.c       | 12 ++---
> >  drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
> >  drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
> >  drivers/net/ark/ark_ethdev_tx.c | 10 ++---
> >  drivers/net/ark/ark_logs.h      | 63 +++------------------------
> >  drivers/net/ark/ark_mpu.c       | 32 ++++----------
> >  drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
> >  drivers/net/ark/ark_pktdir.c    |  2 +-
> >  drivers/net/ark/ark_pktgen.c    | 22 +++++-----
> >  drivers/net/ark/ark_rqp.c       |  4 +-
> >  drivers/net/ark/ark_udm.c       | 18 ++++----
> >  12 files changed, 125 insertions(+), 210 deletions(-)
> > 
> > diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> > index 06e8c3374..c3ffcbbc2 100644
> > --- a/doc/guides/nics/ark.rst
> > +++ b/doc/guides/nics/ark.rst
> > @@ -132,19 +132,6 @@ Configuration Information
> >     * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> >       packets are padded to 60 bytes to support downstream MACS.
> >  
> > -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
> > -     logging and internal checking of RX ingress logic within the ARK PMD driver.
> > -
> > -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
> > -     logging and internal checking of TX egress logic within the ARK PMD driver.
> > -
> > -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
> > -     logging of detailed packet and performance statistics gathered in
> > -     the PMD and FPGA.
> > -
> > -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
> > -     logging of detailed PMD events and status.
> > -
> 
> Can you please remove these config option from 'config/common_base'?
> 
Given that the file is scheduled for deletion fairly soon, not sure if that
is worthwhile doing.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-24 13:36   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
@ 2020-08-24 14:55     ` Ferruh Yigit
  2020-08-24 21:51       ` Ed Czeck
  0 siblings, 1 reply; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-24 14:55 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/24/2020 2:36 PM, Ed Czeck wrote:
> Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
> with a default value of 0.
> Update documentation as needed.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  doc/guides/nics/ark.rst         | 13 ++++++++--
>  drivers/net/ark/ark_ethdev_tx.c | 44 +++++++++++++++++++--------------
>  drivers/net/ark/ark_logs.h      |  8 ------
>  3 files changed, 36 insertions(+), 29 deletions(-)
> 
> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> index c3ffcbbc2..f4d4539e5 100644
> --- a/doc/guides/nics/ark.rst
> +++ b/doc/guides/nics/ark.rst
> @@ -129,8 +129,10 @@ Configuration Information
>     * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
>       of the ARK PMD driver in the DPDK compilation.
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> -     packets are padded to 60 bytes to support downstream MACS.
> +  * **CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
> +    packet length for tx packets to the FPGA.  Packets less than this
> +    length are padded to meet the requirement. This allows padding to
> +    be offloaded or remain in host software.
>  

There is no 'CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN' option, I think it is
confusing to add it to documentation. There is already some documentation in
below for 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN', what do you think removing this part?

And can you please remove 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' form 'config/common_base'?

Another option is, do you think does it help your users to keep the config name
same, like keep the 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' as 'RTE_LIBRTE_ARK_PAD_TX'
for the meson CFLAGs, instead of renaming it to 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN'?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-24 14:40     ` Bruce Richardson
@ 2020-08-24 15:09       ` Ferruh Yigit
  2020-08-24 21:40         ` Ed Czeck
  0 siblings, 1 reply; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-24 15:09 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ed Czeck, dev, shepard.siegel, john.miller

On 8/24/2020 3:40 PM, Bruce Richardson wrote:
> On Mon, Aug 24, 2020 at 03:37:53PM +0100, Ferruh Yigit wrote:
>> On 8/24/2020 2:36 PM, Ed Czeck wrote:
>>> Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
>>> PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
>>> Review and adjust log levels and messages as needed.
>>>
>>> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
>>> ---
>>>  doc/guides/nics/ark.rst         | 13 ------
>>>  drivers/net/ark/ark_ddm.c       | 12 ++---
>>>  drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
>>>  drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
>>>  drivers/net/ark/ark_ethdev_tx.c | 10 ++---
>>>  drivers/net/ark/ark_logs.h      | 63 +++------------------------
>>>  drivers/net/ark/ark_mpu.c       | 32 ++++----------
>>>  drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
>>>  drivers/net/ark/ark_pktdir.c    |  2 +-
>>>  drivers/net/ark/ark_pktgen.c    | 22 +++++-----
>>>  drivers/net/ark/ark_rqp.c       |  4 +-
>>>  drivers/net/ark/ark_udm.c       | 18 ++++----
>>>  12 files changed, 125 insertions(+), 210 deletions(-)
>>>
>>> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
>>> index 06e8c3374..c3ffcbbc2 100644
>>> --- a/doc/guides/nics/ark.rst
>>> +++ b/doc/guides/nics/ark.rst
>>> @@ -132,19 +132,6 @@ Configuration Information
>>>     * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
>>>       packets are padded to 60 bytes to support downstream MACS.
>>>  
>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
>>> -     logging and internal checking of RX ingress logic within the ARK PMD driver.
>>> -
>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
>>> -     logging and internal checking of TX egress logic within the ARK PMD driver.
>>> -
>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
>>> -     logging of detailed packet and performance statistics gathered in
>>> -     the PMD and FPGA.
>>> -
>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
>>> -     logging of detailed PMD events and status.
>>> -
>>
>> Can you please remove these config option from 'config/common_base'?
>>
> Given that the file is scheduled for deletion fairly soon, not sure if that
> is worthwhile doing.
> 

Since there is possible new version already because of comment in 2/2, I think
better to update 'config/common_base' for the sake of completeness.

But if there won't be a new version, this can be skipped pragmatically.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-24 15:09       ` Ferruh Yigit
@ 2020-08-24 21:40         ` Ed Czeck
  2020-08-25  7:44           ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-24 21:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bruce Richardson, dev, Shepard Siegel, John Miller

On Mon, Aug 24, 2020 at 11:09 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 8/24/2020 3:40 PM, Bruce Richardson wrote:
> > On Mon, Aug 24, 2020 at 03:37:53PM +0100, Ferruh Yigit wrote:
> >> On 8/24/2020 2:36 PM, Ed Czeck wrote:
> >>> Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
> >>> PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
> >>> Review and adjust log levels and messages as needed.
> >>>
> >>> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> >>> ---
> >>>  doc/guides/nics/ark.rst         | 13 ------
> >>>  drivers/net/ark/ark_ddm.c       | 12 ++---
> >>>  drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
> >>>  drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
> >>>  drivers/net/ark/ark_ethdev_tx.c | 10 ++---
> >>>  drivers/net/ark/ark_logs.h      | 63 +++------------------------
> >>>  drivers/net/ark/ark_mpu.c       | 32 ++++----------
> >>>  drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
> >>>  drivers/net/ark/ark_pktdir.c    |  2 +-
> >>>  drivers/net/ark/ark_pktgen.c    | 22 +++++-----
> >>>  drivers/net/ark/ark_rqp.c       |  4 +-
> >>>  drivers/net/ark/ark_udm.c       | 18 ++++----
> >>>  12 files changed, 125 insertions(+), 210 deletions(-)
> >>>
> >>> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> >>> index 06e8c3374..c3ffcbbc2 100644
> >>> --- a/doc/guides/nics/ark.rst
> >>> +++ b/doc/guides/nics/ark.rst
> >>> @@ -132,19 +132,6 @@ Configuration Information
> >>>     * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> >>>       packets are padded to 60 bytes to support downstream MACS.
> >>>
> >>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
> >>> -     logging and internal checking of RX ingress logic within the ARK PMD driver.
> >>> -
> >>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
> >>> -     logging and internal checking of TX egress logic within the ARK PMD driver.
> >>> -
> >>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
> >>> -     logging of detailed packet and performance statistics gathered in
> >>> -     the PMD and FPGA.
> >>> -
> >>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
> >>> -     logging of detailed PMD events and status.
> >>> -
> >>
> >> Can you please remove these config option from 'config/common_base'?
> >>
> > Given that the file is scheduled for deletion fairly soon, not sure if that
> > is worthwhile doing.
> >
>
> Since there is possible new version already because of comment in 2/2, I think
> better to update 'config/common_base' for the sake of completeness.
>
> But if there won't be a new version, this can be skipped pragmatically.

I will avoid the update of config/common_base as changes there will
cause merge conflict.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-24 14:55     ` Ferruh Yigit
@ 2020-08-24 21:51       ` Ed Czeck
  2020-08-25  7:43         ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-24 21:51 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Richardson, Bruce, Shepard Siegel, John Miller

On Mon, Aug 24, 2020 at 10:55 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 8/24/2020 2:36 PM, Ed Czeck wrote:
> > Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
> > with a default value of 0.
> > Update documentation as needed.
> >
> > Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> > ---
> >  doc/guides/nics/ark.rst         | 13 ++++++++--
> >  drivers/net/ark/ark_ethdev_tx.c | 44 +++++++++++++++++++--------------
> >  drivers/net/ark/ark_logs.h      |  8 ------
> >  3 files changed, 36 insertions(+), 29 deletions(-)
> >
> > diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> > index c3ffcbbc2..f4d4539e5 100644
> > --- a/doc/guides/nics/ark.rst
> > +++ b/doc/guides/nics/ark.rst
> > @@ -129,8 +129,10 @@ Configuration Information
> >     * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
> >       of the ARK PMD driver in the DPDK compilation.
> >
> > -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> > -     packets are padded to 60 bytes to support downstream MACS.
> > +  * **CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
> > +    packet length for tx packets to the FPGA.  Packets less than this
> > +    length are padded to meet the requirement. This allows padding to
> > +    be offloaded or remain in host software.
> >
>
> There is no 'CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN' option, I think it is
> confusing to add it to documentation. There is already some documentation in
> below for 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN', what do you think removing this part?
>
Should I remove the all references to the CONFIG_RTE_LIBRTE_ARK from
the net/ark section of the guide?  It appears that CONFIG_.* will be
removed along with the makefile build system.

> And can you please remove 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' form 'config/common_base'?
>
I am hesitant to modify config/common_base, since it is slated for
removal and edits will cause merge conflicts.  Are you OK with this?

> Another option is, do you think does it help your users to keep the config name
> same, like keep the 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' as 'RTE_LIBRTE_ARK_PAD_TX'
> for the meson CFLAGs, instead of renaming it to 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN'?
I will drop the CONFIG names and leave the compiler marco documented
in my next patch.

Thx,

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-24 21:51       ` Ed Czeck
@ 2020-08-25  7:43         ` Ferruh Yigit
  0 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-25  7:43 UTC (permalink / raw)
  To: Ed Czeck; +Cc: dev, Richardson, Bruce, Shepard Siegel, John Miller

On 8/24/2020 10:51 PM, Ed Czeck wrote:
> On Mon, Aug 24, 2020 at 10:55 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 8/24/2020 2:36 PM, Ed Czeck wrote:
>>> Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
>>> with a default value of 0.
>>> Update documentation as needed.
>>>
>>> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
>>> ---
>>>  doc/guides/nics/ark.rst         | 13 ++++++++--
>>>  drivers/net/ark/ark_ethdev_tx.c | 44 +++++++++++++++++++--------------
>>>  drivers/net/ark/ark_logs.h      |  8 ------
>>>  3 files changed, 36 insertions(+), 29 deletions(-)
>>>
>>> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
>>> index c3ffcbbc2..f4d4539e5 100644
>>> --- a/doc/guides/nics/ark.rst
>>> +++ b/doc/guides/nics/ark.rst
>>> @@ -129,8 +129,10 @@ Configuration Information
>>>     * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
>>>       of the ARK PMD driver in the DPDK compilation.
>>>
>>> -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
>>> -     packets are padded to 60 bytes to support downstream MACS.
>>> +  * **CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
>>> +    packet length for tx packets to the FPGA.  Packets less than this
>>> +    length are padded to meet the requirement. This allows padding to
>>> +    be offloaded or remain in host software.
>>>
>>
>> There is no 'CONFIG_RTE_LIBRTE_ARK_MIN_TX_PKTLEN' option, I think it is
>> confusing to add it to documentation. There is already some documentation in
>> below for 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN', what do you think removing this part?
>>
> Should I remove the all references to the CONFIG_RTE_LIBRTE_ARK from
> the net/ark section of the guide?  It appears that CONFIG_.* will be
> removed along with the makefile build system.

As you said it is removed by Ciara's patch, no need to touch it in this patch.

> 
>> And can you please remove 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' form 'config/common_base'?
>>
> I am hesitant to modify config/common_base, since it is slated for
> removal and edits will cause merge conflicts.  Are you OK with this?

OK.

> 
>> Another option is, do you think does it help your users to keep the config name
>> same, like keep the 'CONFIG_RTE_LIBRTE_ARK_PAD_TX' as 'RTE_LIBRTE_ARK_PAD_TX'
>> for the meson CFLAGs, instead of renaming it to 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN'?
> I will drop the CONFIG names and leave the compiler marco documented
> in my next patch.
> 

OK, thanks.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-24 21:40         ` Ed Czeck
@ 2020-08-25  7:44           ` Ferruh Yigit
  0 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-08-25  7:44 UTC (permalink / raw)
  To: Ed Czeck; +Cc: Bruce Richardson, dev, Shepard Siegel, John Miller

On 8/24/2020 10:40 PM, Ed Czeck wrote:
> On Mon, Aug 24, 2020 at 11:09 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 8/24/2020 3:40 PM, Bruce Richardson wrote:
>>> On Mon, Aug 24, 2020 at 03:37:53PM +0100, Ferruh Yigit wrote:
>>>> On 8/24/2020 2:36 PM, Ed Czeck wrote:
>>>>> Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
>>>>> PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
>>>>> Review and adjust log levels and messages as needed.
>>>>>
>>>>> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
>>>>> ---
>>>>>  doc/guides/nics/ark.rst         | 13 ------
>>>>>  drivers/net/ark/ark_ddm.c       | 12 ++---
>>>>>  drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
>>>>>  drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
>>>>>  drivers/net/ark/ark_ethdev_tx.c | 10 ++---
>>>>>  drivers/net/ark/ark_logs.h      | 63 +++------------------------
>>>>>  drivers/net/ark/ark_mpu.c       | 32 ++++----------
>>>>>  drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
>>>>>  drivers/net/ark/ark_pktdir.c    |  2 +-
>>>>>  drivers/net/ark/ark_pktgen.c    | 22 +++++-----
>>>>>  drivers/net/ark/ark_rqp.c       |  4 +-
>>>>>  drivers/net/ark/ark_udm.c       | 18 ++++----
>>>>>  12 files changed, 125 insertions(+), 210 deletions(-)
>>>>>
>>>>> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
>>>>> index 06e8c3374..c3ffcbbc2 100644
>>>>> --- a/doc/guides/nics/ark.rst
>>>>> +++ b/doc/guides/nics/ark.rst
>>>>> @@ -132,19 +132,6 @@ Configuration Information
>>>>>     * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
>>>>>       packets are padded to 60 bytes to support downstream MACS.
>>>>>
>>>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
>>>>> -     logging and internal checking of RX ingress logic within the ARK PMD driver.
>>>>> -
>>>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
>>>>> -     logging and internal checking of TX egress logic within the ARK PMD driver.
>>>>> -
>>>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
>>>>> -     logging of detailed packet and performance statistics gathered in
>>>>> -     the PMD and FPGA.
>>>>> -
>>>>> -   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
>>>>> -     logging of detailed PMD events and status.
>>>>> -
>>>>
>>>> Can you please remove these config option from 'config/common_base'?
>>>>
>>> Given that the file is scheduled for deletion fairly soon, not sure if that
>>> is worthwhile doing.
>>>
>>
>> Since there is possible new version already because of comment in 2/2, I think
>> better to update 'config/common_base' for the sake of completeness.
>>
>> But if there won't be a new version, this can be skipped pragmatically.
> 
> I will avoid the update of config/common_base as changes there will
> cause merge conflict.
> 

OK

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
                   ` (3 preceding siblings ...)
  2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-08-26 15:24 ` Ed Czeck
  2020-08-26 15:24   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
  2020-08-27 16:11 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
  2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
  6 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-26 15:24 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ------
 drivers/net/ark/ark_ddm.c       | 12 ++---
 drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
 drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
 drivers/net/ark/ark_ethdev_tx.c | 10 ++---
 drivers/net/ark/ark_logs.h      | 63 +++------------------------
 drivers/net/ark/ark_mpu.c       | 32 ++++----------
 drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
 drivers/net/ark/ark_pktdir.c    |  2 +-
 drivers/net/ark/ark_pktgen.c    | 22 +++++-----
 drivers/net/ark/ark_rqp.c       |  4 +-
 drivers/net/ark/ark_udm.c       | 18 ++++----
 12 files changed, 125 insertions(+), 210 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..c3ffcbbc2 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 57026f8d1..91d1179d8 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
 	uint32_t hw_const;
 	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-		PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+		ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
 			    ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
 		return -1;
 	}
 
 	hw_const = ddm->cfg.const0;
 	if (hw_const == ARK_DDM_CONST1) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module is version 1, "
 			    "PMD expects version 2\n");
 		return -1;
 	} else if (hw_const != ARK_DDM_CONST2) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module not found as expected 0x%08x\n",
 			    ddm->cfg.const0);
 		return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
 	status = ark_ddm_stop(ddm, 1);
 
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		ddm->cfg.command = 4;
 		usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-	PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
 		     ark_ddm_is_stopped(ddm)
 		     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
 	struct ark_ddm_stats_t *stats = &ddm->stats;
 
-	PMD_STATS_LOG(INFO, "DDM Stats: %s"
+	ARK_PMD_LOG(INFO, "DDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64
 		      "\n", msg,
 		      "Bytes:", stats->tx_byte_count,
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd867..646427d0c 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
 	const char *dllpath = getenv("ARK_EXT_PATH");
 
 	if (dllpath == NULL) {
-		PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+		ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
 		return 0;
 	}
-	PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+	ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
 	/* Open and load the .so */
 	ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
 	if (ark->d_handle == NULL) {
-		PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+		ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
 			    dllpath);
 		return -1;
 	}
-	PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+	ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
 			    dllpath);
 
 	/* Get the entry points */
 	ark->user_ext.dev_init =
 		(void *(*)(struct rte_eth_dev *, void *, int))
 		dlsym(ark->d_handle, "dev_init");
-	PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+	ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
 		      ark->user_ext.dev_init);
 	ark->user_ext.dev_get_port_count =
 		(int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	ark->eth_dev = dev;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
+	ARK_PMD_LOG(DEBUG, "\n");
 
 	/* Check to see if there is an extension that we need to load */
 	ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
 
-	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
 		      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-	PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
 		    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
 	/* If HW sanity test fails, return an error */
 	if (ark->sysctrl.t32[4] != 0xcafef00d) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "HW Sanity test has failed, expected constant"
 			    " 0x%x, read 0x%x (%s)\n",
 			    0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	}
 	if (ark->sysctrl.t32[3] != 0) {
 		if (ark_rqp_lasped(ark->rqpacing)) {
-			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+			ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
 				    "Timer has Expired\n");
 			return -1;
 		}
-		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+		ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
 			    "Timer is Running\n");
 	}
 
-	PMD_DRV_LOG(INFO,
+	ARK_PMD_LOG(DEBUG,
 		    "HW Sanity test has PASSED, expected constant"
 		    " 0x%x, read 0x%x (%s)\n",
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocated memory for storing mac address"
 			    );
 	}
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		ark->user_data[dev->data->port_id] =
 			ark->user_ext.dev_init(dev, ark->a_bar, 0);
 		if (!ark->user_data[dev->data->port_id]) {
-			PMD_DRV_LOG(INFO,
+			ARK_PMD_LOG(WARNING,
 				    "Failed to initialize PMD extension!"
 				    " continuing without it\n");
 			memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	if (pci_dev->device.devargs)
 		ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
 	else
-		PMD_DRV_LOG(INFO, "No Device args found\n");
+		ARK_PMD_LOG(INFO, "No Device args found\n");
 
 	if (ret)
 		goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		/* reserve an ethdev entry */
 		eth_dev = rte_eth_dev_allocate(name);
 		if (!eth_dev) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Could not allocate eth_dev for port %d\n",
 				    p);
 			goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		eth_dev->data->mac_addrs = rte_zmalloc(name,
 						RTE_ETHER_ADDR_LEN, 0);
 		if (!eth_dev->data->mac_addrs) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Memory allocation for MAC failed!"
 				    " Exiting.\n");
 			goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* UDM */
 	if (ark_udm_reset(ark->udm.v)) {
-		PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
 		return -1;
 	}
 	/* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* TX -- DDM */
 	if (ark_ddm_stop(ark->ddm.v, 1))
-		PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
 	mpu = ark->mputx.v;
 	num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-	PMD_FUNC_LOG(DEBUG, "\n");
 	struct ark_adapter *ark = dev->data->dev_private;
 
 	eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	int i;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	/* RX Side */
 	/* start UDM */
 	ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		 * This is only used for sanity checking with internal generator
 		 */
 		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-			PMD_DRV_LOG(ERR, "Could not create pktgen "
+			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
 		}
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	struct ark_mpu_t *mpu;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	if (ark->started == 0)
 		return;
 	ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
 			uint16_t port = dev->data->port_id;
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
 				    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+		ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
 			    " %d iter: %u. (%s)\n",
 			    status,
 			    i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+		ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
 			    status, i, __func__);
 		ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-	PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+	ARK_PMD_LOG(DEBUG, "link status = %d\n",
 			dev->data->dev_link.link_status);
 	struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
 		   void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	struct ark_adapter *ark =
 		(struct ark_adapter *)extra_args;
 
 	ark->pkt_dir_v = strtol(value, NULL, 16);
-	PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
 	return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	int first = 1;
 
 	if (file == NULL) {
-		PMD_DRV_LOG(ERR, "Unable to open "
+		ARK_PMD_LOG(ERR, "Unable to open "
 			    "config file %s\n", value);
 		return -1;
 	}
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	while (fgets(line, sizeof(line), file)) {
 		size += strlen(line);
 		if (size >= ARK_MAX_ARG_LEN) {
-			PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+			ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
 				    "parameter list is too long\n", value);
 			fclose(file);
 			return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 			strncat(args, line, ARK_MAX_ARG_LEN);
 		}
 	}
-	PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+	ARK_PMD_LOG(DEBUG, "file = %s\n", args);
 	fclose(file);
 	return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
 	for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
 		pair = &kvlist->pairs[k_idx];
-		PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+		ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
 			     pair->key,
 			     pair->value);
 	}
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTDIR_ARG,
 			       &process_pktdir_arg,
 			       ark) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
 		goto free_kvlist;
 	}
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTGEN_ARG,
 			       &process_file_args,
 			       ark->pkt_gen_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
 		goto free_kvlist;
 	}
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTCHKR_ARG,
 			       &process_file_args,
 			       ark->pkt_chkr_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
 		goto free_kvlist;
 	}
 
-	PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
 	/* Setup the packet director */
 	ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
 	/* Setup the packet generator */
 	if (ark->pkt_gen_args[0]) {
-		PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+		ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
 		ark_pktgen_parse(ark->pkt_gen_args);
 		ark_pktgen_reset(ark->pg);
 		ark_pktgen_setup(ark->pg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 4d518d558..2f8d05099 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
 	/* Verify HW */
 	if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-		PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+		ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
 		return -1;
 	}
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 	if (rx_conf != NULL && warning1 == 0) {
 		warning1 = 1;
-		PMD_DRV_LOG(INFO,
+		ARK_PMD_LOG(NOTICE,
 			    "Arkville ignores rte_eth_rxconf argument.\n");
 	}
 
 	if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
 			    ARK_RX_META_SIZE, __func__);
 		return -1;		/* ERROR CODE */
 	}
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
 			    nb_desc, __func__);
 		return -1;		/* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+		ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
 		return -ENOMEM;
 	}
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocate queue memory in %s\n",
 			    __func__);
 		rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	status = eth_ark_rx_seed_mbufs(queue);
 
 	if (queue->seed_index != nb_desc) {
-		PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+		ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
 			    nb_desc, qidx);
 		status = -1;
 	}
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (unlikely(status != 0)) {
 		struct rte_mbuf **mbuf;
 
-		PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+		ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
 			    qidx,
 			    __func__);
 		/* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
 		mbuf->timestamp = meta->timestamp;
 		mbuf->udata64 = meta->user_data;
 
-		if (ARK_RX_DEBUG) {	/* debug sanity checks */
+		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
 			    (meta->pkt_len == 0)) {
-				PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+				ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
 					   " cons: %" PRIU32
 					   " prod: %" PRIU32
 					   " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
 					   queue->seed_index);
 
 
-				PMD_RX_LOG(DEBUG, "       :  UDM"
+				ARK_PMD_LOG(DEBUG, "       :  UDM"
 					   " prod: %" PRIU32
 					   " len: %u\n",
 					   queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 		mbuf_prev = mbuf;
 		mbuf->data_len = data_len;
 		mbuf->data_off = 0;
-		if (ARK_RX_DEBUG)
+		if (ARK_DEBUG_CORE)
 			mbuf->seqn = cons_index;	/* for debug only */
 
 		cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 		}
 	}
 
-	if (ARK_RX_DEBUG) {		/* DEBUG */
+	if (ARK_DEBUG_CORE) {		/* DEBUG */
 		while (count != nb) {
 			struct rte_mbuf *mbuf_init =
 				queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
 	*pnb = 64U;
 	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
 	if (status != 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(NOTICE,
 			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
 			    " %u free buffers remaining in queue\n",
 			    *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
 	if (!ark_udm_is_flushed(ark->udm.v)) {
 		/* restart the MPUs */
-		PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+		ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
 			if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 		/* Wait to allow data to pass */
 		usleep(100);
 
-		PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+		ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
 				ark_udm_is_flushed(ark->udm.v));
 	}
 	ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
 	if (queue == NULL)
 		return;
-	PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-	PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+	ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+	ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
 			"queue_size", queue->queue_size,
 			"seed_index", queue->seed_index,
 			"prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
 	uint16_t i, j;
 
-	PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-		mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+	ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+		    mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
 	for (i = lo; i < hi; i += 16) {
 		uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-		PMD_DRV_LOG(INFO, "  %6d:  ", i);
+		ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
 		for (j = 0; j < 16; j++)
-			PMD_DRV_LOG(INFO, " %02x", dp[j]);
+			ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-		PMD_DRV_LOG(INFO, "\n");
+		ARK_PMD_LOG(DEBUG, "\n");
 	}
 }
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 289668774..72624deb3 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 	}
 
-	if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-		PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+	if (ARK_DEBUG_CORE && nb != nb_pkts) {
+		ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
 			   " req: %" PRIU32
 			   " sent: %" PRIU32
 			   " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 	int qidx = queue_idx;
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size"
 			    " must be power of two %u (%s)\n",
 			    nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate tx "
+		ARK_PMD_LOG(ERR, "Failed to allocate tx "
 			    "queue memory in %s\n",
 			    __func__);
 		return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->meta_q == 0 || queue->bufs == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate "
+		ARK_PMD_LOG(ERR, "Failed to allocate "
 			    "queue memory in %s\n", __func__);
 		rte_free(queue->meta_q);
 		rte_free(queue->bufs);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..c3d7e7d39 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -28,66 +28,15 @@
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)	\
-	rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)			\
-	do {							\
-		if (0)						\
-			PMD_DRV_LOG(level, fmt, ## args);	\
-	} while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)				\
-	do {								\
-		if (0)							\
-			PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-	} while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 21f840f3c..8160c1de7 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 	if ((mpu->id.idnum != 0x2055504d) ||
 	    (mpu->hw.obj_size != obj_size) ||
 	    (version != 0x00003100)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU module not found as expected %08x"
 			    " \"%c%c%c%c %c%c%c%c\"\n",
 			    mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 			    mpu->id.id[2], mpu->id.id[3],
 			    mpu->id.ver[0], mpu->id.ver[1],
 			    mpu->id.ver[2], mpu->id.ver[3]);
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU HW num_queues: %u hw_depth %u,"
 			    " obj_size: %u, obj_per_mrr: %u"
 			    " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
 	ark_mpu_reset(mpu);
 
 	if (!rte_is_power_of_2(ring_size)) {
-		PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+		ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
 			    ring_size);
 		return -1;
 	}
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
 	/* DUMP to see that we have started */
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
 		      code, qid,
 		      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-		      " data 0x%08x_%08x 0x%08x_%08x\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+		      "\n",
 		      code,
 		      mpu->debug.state, mpu->debug.count,
-		      mpu->debug.reserved,
-		      mpu->debug.peek[1],
-		      mpu->debug.peek[0],
-		      mpu->debug.peek[3],
-		      mpu->debug.peek[2]
-		      );
-	PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-		      ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-		      code, qid,
-		      "PCI Request:", mpu->stats.pci_request,
-		      "Queue_empty", mpu->stats.q_empty,
-		      "Queue_q1", mpu->stats.q_q1,
-		      "Queue_q2", mpu->stats.q_q2,
-		      "Queue_q3", mpu->stats.q_q3,
-		      "Queue_q4", mpu->stats.q_q4,
-		      "Queue_full", mpu->stats.q_full
+		      mpu->debug.reserved
 		      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
 		      ARK_SU64X "\n",
 		      q_id,
 		      "ring_base", mpu->cfg.ring_base
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index ef861eea3..b8fb69497 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_chkr_inst",
 			   sizeof(struct ark_pkt_chkr_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
 		return inst;
 	}
 	inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+		ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
 	if (ark_pktchkr_is_gen_forever(handle)) {
-		PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
 			      " because gen_forever=1\n");
 		return -1;
 	}
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+		ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
 			      " internal pktgen to finish sending...\n",
 			      inst->ordinal);
-		PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+		ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
 			      inst->ordinal);
 	}
 	return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-	PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
 		      inst->sregs->pkts_rcvd);
-	PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+	ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
 		      inst->sregs->bytes_rcvd);
-	PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
 		      inst->sregs->pkts_ok);
-	PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
 		      inst->sregs->pkts_mismatch);
-	PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
 		      inst->sregs->pkts_err);
-	PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+	ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
 		      inst->sregs->first_mismatch);
-	PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
 		      inst->sregs->resync_events);
-	PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
 		      inst->sregs->pkts_missing);
-	PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
 		      inst->sregs->min_latency);
-	PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
 		      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
 		if (strcmp(id, toptions[i].opt) == 0)
 			return &toptions[i];
 	}
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "pktchkr: Could not find requested option!, option = %s\n",
 		    id);
 	return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
 		ark_pktchkr_stop(handle);
 
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
 			      options("port")->v.INT);
 		ark_pktchkr_run(handle);
 	}
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 1f2c8182a..25e121831 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
 			   sizeof(struct ark_pkt_dir_inst),
 			   0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index 2cae252d6..4a02662a4 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_gen_inst_pmd",
 			   sizeof(struct ark_pkt_gen_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
 	while (!ark_pktgen_paused(handle)) {
 		usleep(1000);
 		if (cnt++ > 100) {
-			PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+			ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
 				    inst->ordinal);
 			break;
 		}
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (!ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+		ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
 			      " and is not paused. No need to reset.\n",
 			      inst->ordinal);
 		return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Pktgen %d is not paused. Pausing first.\n",
 			      inst->ordinal);
 		ark_pktgen_pause(handle);
 	}
 
-	PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
 	inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
 	int wait_cycle = 10;
 
 	if (ark_pktgen_is_gen_forever(handle))
-		PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
 			    " because gen_forever=1\n");
 
 	while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Waiting for pktgen %d to finish sending...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
 			return &toptions[i];
 	}
 
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "Pktgen: Could not find requested option!, "
 		    "option = %s\n",
 		    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
 	if (options("reset")->v.BOOL)
 		ark_pktgen_reset(handle);
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
 				options("port")->v.INT);
 		ark_pktgen_run(handle);
 	}
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index bf1af4d61..ef9ccd070 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
 	if (rqp->err_count_other != 0)
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
 			    ARK_SU32
 			    ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
 			    "Error Count", rqp->err_cnt,
 			    "Error General", rqp->err_count_other);
 
-	PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+	ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
 		      ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 03f1922c6..a740d36d4 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
 	if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM structure looks incorrect %d vs %zd\n",
 			    ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
 		return -1;
 	}
 
 	if (udm->setup.const0 != ARK_UDM_CONST) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM module not found as expected 0x%08x\n",
 			    udm->setup.const0);
 		return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
 	status = ark_udm_stop(udm, 1);
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		udm->cfg.command = 4;
 		usleep(10);
 		udm->cfg.command = 3;
 		status = ark_udm_stop(udm, 0);
-		PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+		ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
 			      " and forced reset\n",
 			      __func__, status);
 	} else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_STATS_LOG(INFO, "UDM Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
 		      msg,
 		      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-	PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
 		      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
 		      ARK_SU64X ARK_SU32 "\n",
 		      q_id,
 		      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
 	struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-	PMD_STATS_LOG(INFO, "UDM Performance %s"
+	ARK_PMD_LOG(INFO, "UDM Performance %s"
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      "\n",
 		      msg,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-26 15:24 ` Ed Czeck
@ 2020-08-26 15:24   ` Ed Czeck
  0 siblings, 0 replies; 27+ messages in thread
From: Ed Czeck @ 2020-08-26 15:24 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
with a default value of 0.
Update documentation as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 16 ++++++++----
 drivers/net/ark/ark_ethdev_tx.c | 44 +++++++++++++++++++--------------
 drivers/net/ark/ark_logs.h      |  8 ------
 3 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index c3ffcbbc2..c7ed4095f 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -126,11 +126,10 @@ Configuration Information
 
   The following configuration options are available for the ARK PMD:
 
-   * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
-     of the ARK PMD driver in the DPDK compilation.
-
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
+   * **RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
+     packet length for tx packets to the FPGA.  Packets less than this
+     length are padded to meet the requirement. This allows padding to
+     be offloaded or remain in host software.
 
 
 Building DPDK
@@ -144,6 +143,13 @@ By default the ARK PMD library will be built into the DPDK library.
 For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
 documentation that comes with DPDK suite <linux_gsg>`.
 
+To build with a non-zero minimum tx packet length, set the above macro in your
+CFLAGS environment prior to the meson build step. I.e.,
+
+    export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
+    meson build
+
+
 Supported ARK RTL PCIe Instances
 --------------------------------
 
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 72624deb3..d24d7ac21 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -15,6 +15,13 @@
 #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
 
 
+#ifndef RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#define ARK_MIN_TX_PKTLEN 0
+#else
+#define ARK_MIN_TX_PKTLEN RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#endif
+
+
 /* ************************************************************************* */
 struct ark_tx_queue {
 	struct ark_tx_meta *meta_q;
@@ -91,6 +98,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint32_t prod_index_limit;
 	int stat;
 	uint16_t nb;
+	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
 
 	queue = (struct ark_tx_queue *)vtxq;
 
@@ -104,27 +112,25 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
-		if (ARK_TX_PAD_TO_60) {
-			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
-				/* this packet even if it is small can be split,
-				 * be sure to add to the end mbuf
+		if (unlikely(rte_pktmbuf_pkt_len(mbuf) < min_pkt_len)) {
+			/* this packet even if it is small can be split,
+			 * be sure to add to the end mbuf
+			 */
+			uint16_t to_add = min_pkt_len -
+				rte_pktmbuf_pkt_len(mbuf);
+			char *appended =
+				rte_pktmbuf_append(mbuf, to_add);
+
+			if (appended == 0) {
+				/* This packet is in error,
+				 * we cannot send it so just
+				 * count it and delete it.
 				 */
-				uint16_t to_add =
-					60 - rte_pktmbuf_pkt_len(mbuf);
-				char *appended =
-					rte_pktmbuf_append(mbuf, to_add);
-
-				if (appended == 0) {
-					/* This packet is in error,
-					 * we cannot send it so just
-					 * count it and delete it.
-					 */
-					queue->tx_errors += 1;
-					rte_pktmbuf_free(mbuf);
-					continue;
-				}
-				memset(appended, 0, to_add);
+				queue->tx_errors += 1;
+				rte_pktmbuf_free(mbuf);
+				continue;
 			}
+			memset(appended, 0, to_add);
 		}
 
 		if (unlikely(mbuf->nb_segs != 1)) {
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index c3d7e7d39..ca46d86c9 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -8,14 +8,6 @@
 #include <inttypes.h>
 #include <rte_log.h>
 
-
-/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
-#define ARK_TX_PAD_TO_60   0
-#endif
-
 /* system camel case definition changed to upper case */
 #define PRIU32 PRIu32
 #define PRIU64 PRIu64
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
                   ` (4 preceding siblings ...)
  2020-08-26 15:24 ` Ed Czeck
@ 2020-08-27 16:11 ` Ed Czeck
  2020-08-27 16:11   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
  2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
  6 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-27 16:11 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ------
 drivers/net/ark/ark_ddm.c       | 12 ++---
 drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
 drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
 drivers/net/ark/ark_ethdev_tx.c | 10 ++---
 drivers/net/ark/ark_logs.h      | 63 +++------------------------
 drivers/net/ark/ark_mpu.c       | 32 ++++----------
 drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
 drivers/net/ark/ark_pktdir.c    |  2 +-
 drivers/net/ark/ark_pktgen.c    | 22 +++++-----
 drivers/net/ark/ark_rqp.c       |  4 +-
 drivers/net/ark/ark_udm.c       | 18 ++++----
 12 files changed, 125 insertions(+), 210 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..c3ffcbbc2 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 57026f8d1..91d1179d8 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
 	uint32_t hw_const;
 	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-		PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+		ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
 			    ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
 		return -1;
 	}
 
 	hw_const = ddm->cfg.const0;
 	if (hw_const == ARK_DDM_CONST1) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module is version 1, "
 			    "PMD expects version 2\n");
 		return -1;
 	} else if (hw_const != ARK_DDM_CONST2) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module not found as expected 0x%08x\n",
 			    ddm->cfg.const0);
 		return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
 	status = ark_ddm_stop(ddm, 1);
 
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		ddm->cfg.command = 4;
 		usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-	PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
 		     ark_ddm_is_stopped(ddm)
 		     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
 	struct ark_ddm_stats_t *stats = &ddm->stats;
 
-	PMD_STATS_LOG(INFO, "DDM Stats: %s"
+	ARK_PMD_LOG(INFO, "DDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64
 		      "\n", msg,
 		      "Bytes:", stats->tx_byte_count,
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd867..646427d0c 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
 	const char *dllpath = getenv("ARK_EXT_PATH");
 
 	if (dllpath == NULL) {
-		PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+		ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
 		return 0;
 	}
-	PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+	ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
 	/* Open and load the .so */
 	ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
 	if (ark->d_handle == NULL) {
-		PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+		ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
 			    dllpath);
 		return -1;
 	}
-	PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+	ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
 			    dllpath);
 
 	/* Get the entry points */
 	ark->user_ext.dev_init =
 		(void *(*)(struct rte_eth_dev *, void *, int))
 		dlsym(ark->d_handle, "dev_init");
-	PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+	ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
 		      ark->user_ext.dev_init);
 	ark->user_ext.dev_get_port_count =
 		(int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	ark->eth_dev = dev;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
+	ARK_PMD_LOG(DEBUG, "\n");
 
 	/* Check to see if there is an extension that we need to load */
 	ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
 
-	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
 		      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-	PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
 		    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
 	/* If HW sanity test fails, return an error */
 	if (ark->sysctrl.t32[4] != 0xcafef00d) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "HW Sanity test has failed, expected constant"
 			    " 0x%x, read 0x%x (%s)\n",
 			    0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	}
 	if (ark->sysctrl.t32[3] != 0) {
 		if (ark_rqp_lasped(ark->rqpacing)) {
-			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+			ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
 				    "Timer has Expired\n");
 			return -1;
 		}
-		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+		ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
 			    "Timer is Running\n");
 	}
 
-	PMD_DRV_LOG(INFO,
+	ARK_PMD_LOG(DEBUG,
 		    "HW Sanity test has PASSED, expected constant"
 		    " 0x%x, read 0x%x (%s)\n",
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocated memory for storing mac address"
 			    );
 	}
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		ark->user_data[dev->data->port_id] =
 			ark->user_ext.dev_init(dev, ark->a_bar, 0);
 		if (!ark->user_data[dev->data->port_id]) {
-			PMD_DRV_LOG(INFO,
+			ARK_PMD_LOG(WARNING,
 				    "Failed to initialize PMD extension!"
 				    " continuing without it\n");
 			memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	if (pci_dev->device.devargs)
 		ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
 	else
-		PMD_DRV_LOG(INFO, "No Device args found\n");
+		ARK_PMD_LOG(INFO, "No Device args found\n");
 
 	if (ret)
 		goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		/* reserve an ethdev entry */
 		eth_dev = rte_eth_dev_allocate(name);
 		if (!eth_dev) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Could not allocate eth_dev for port %d\n",
 				    p);
 			goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		eth_dev->data->mac_addrs = rte_zmalloc(name,
 						RTE_ETHER_ADDR_LEN, 0);
 		if (!eth_dev->data->mac_addrs) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Memory allocation for MAC failed!"
 				    " Exiting.\n");
 			goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* UDM */
 	if (ark_udm_reset(ark->udm.v)) {
-		PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
 		return -1;
 	}
 	/* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* TX -- DDM */
 	if (ark_ddm_stop(ark->ddm.v, 1))
-		PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
 	mpu = ark->mputx.v;
 	num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-	PMD_FUNC_LOG(DEBUG, "\n");
 	struct ark_adapter *ark = dev->data->dev_private;
 
 	eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	int i;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	/* RX Side */
 	/* start UDM */
 	ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		 * This is only used for sanity checking with internal generator
 		 */
 		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-			PMD_DRV_LOG(ERR, "Could not create pktgen "
+			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
 		}
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	struct ark_mpu_t *mpu;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	if (ark->started == 0)
 		return;
 	ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
 			uint16_t port = dev->data->port_id;
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
 				    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+		ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
 			    " %d iter: %u. (%s)\n",
 			    status,
 			    i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+		ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
 			    status, i, __func__);
 		ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-	PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+	ARK_PMD_LOG(DEBUG, "link status = %d\n",
 			dev->data->dev_link.link_status);
 	struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
 		   void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	struct ark_adapter *ark =
 		(struct ark_adapter *)extra_args;
 
 	ark->pkt_dir_v = strtol(value, NULL, 16);
-	PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
 	return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	int first = 1;
 
 	if (file == NULL) {
-		PMD_DRV_LOG(ERR, "Unable to open "
+		ARK_PMD_LOG(ERR, "Unable to open "
 			    "config file %s\n", value);
 		return -1;
 	}
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	while (fgets(line, sizeof(line), file)) {
 		size += strlen(line);
 		if (size >= ARK_MAX_ARG_LEN) {
-			PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+			ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
 				    "parameter list is too long\n", value);
 			fclose(file);
 			return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 			strncat(args, line, ARK_MAX_ARG_LEN);
 		}
 	}
-	PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+	ARK_PMD_LOG(DEBUG, "file = %s\n", args);
 	fclose(file);
 	return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
 	for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
 		pair = &kvlist->pairs[k_idx];
-		PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+		ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
 			     pair->key,
 			     pair->value);
 	}
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTDIR_ARG,
 			       &process_pktdir_arg,
 			       ark) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
 		goto free_kvlist;
 	}
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTGEN_ARG,
 			       &process_file_args,
 			       ark->pkt_gen_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
 		goto free_kvlist;
 	}
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTCHKR_ARG,
 			       &process_file_args,
 			       ark->pkt_chkr_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
 		goto free_kvlist;
 	}
 
-	PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
 	/* Setup the packet director */
 	ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
 	/* Setup the packet generator */
 	if (ark->pkt_gen_args[0]) {
-		PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+		ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
 		ark_pktgen_parse(ark->pkt_gen_args);
 		ark_pktgen_reset(ark->pg);
 		ark_pktgen_setup(ark->pg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 4d518d558..2f8d05099 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
 	/* Verify HW */
 	if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-		PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+		ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
 		return -1;
 	}
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 	if (rx_conf != NULL && warning1 == 0) {
 		warning1 = 1;
-		PMD_DRV_LOG(INFO,
+		ARK_PMD_LOG(NOTICE,
 			    "Arkville ignores rte_eth_rxconf argument.\n");
 	}
 
 	if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
 			    ARK_RX_META_SIZE, __func__);
 		return -1;		/* ERROR CODE */
 	}
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
 			    nb_desc, __func__);
 		return -1;		/* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+		ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
 		return -ENOMEM;
 	}
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocate queue memory in %s\n",
 			    __func__);
 		rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	status = eth_ark_rx_seed_mbufs(queue);
 
 	if (queue->seed_index != nb_desc) {
-		PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+		ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
 			    nb_desc, qidx);
 		status = -1;
 	}
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (unlikely(status != 0)) {
 		struct rte_mbuf **mbuf;
 
-		PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+		ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
 			    qidx,
 			    __func__);
 		/* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
 		mbuf->timestamp = meta->timestamp;
 		mbuf->udata64 = meta->user_data;
 
-		if (ARK_RX_DEBUG) {	/* debug sanity checks */
+		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
 			    (meta->pkt_len == 0)) {
-				PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+				ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
 					   " cons: %" PRIU32
 					   " prod: %" PRIU32
 					   " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
 					   queue->seed_index);
 
 
-				PMD_RX_LOG(DEBUG, "       :  UDM"
+				ARK_PMD_LOG(DEBUG, "       :  UDM"
 					   " prod: %" PRIU32
 					   " len: %u\n",
 					   queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 		mbuf_prev = mbuf;
 		mbuf->data_len = data_len;
 		mbuf->data_off = 0;
-		if (ARK_RX_DEBUG)
+		if (ARK_DEBUG_CORE)
 			mbuf->seqn = cons_index;	/* for debug only */
 
 		cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 		}
 	}
 
-	if (ARK_RX_DEBUG) {		/* DEBUG */
+	if (ARK_DEBUG_CORE) {		/* DEBUG */
 		while (count != nb) {
 			struct rte_mbuf *mbuf_init =
 				queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
 	*pnb = 64U;
 	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
 	if (status != 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(NOTICE,
 			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
 			    " %u free buffers remaining in queue\n",
 			    *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
 	if (!ark_udm_is_flushed(ark->udm.v)) {
 		/* restart the MPUs */
-		PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+		ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
 			if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 		/* Wait to allow data to pass */
 		usleep(100);
 
-		PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+		ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
 				ark_udm_is_flushed(ark->udm.v));
 	}
 	ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
 	if (queue == NULL)
 		return;
-	PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-	PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+	ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+	ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
 			"queue_size", queue->queue_size,
 			"seed_index", queue->seed_index,
 			"prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
 	uint16_t i, j;
 
-	PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-		mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+	ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+		    mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
 	for (i = lo; i < hi; i += 16) {
 		uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-		PMD_DRV_LOG(INFO, "  %6d:  ", i);
+		ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
 		for (j = 0; j < 16; j++)
-			PMD_DRV_LOG(INFO, " %02x", dp[j]);
+			ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-		PMD_DRV_LOG(INFO, "\n");
+		ARK_PMD_LOG(DEBUG, "\n");
 	}
 }
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 289668774..72624deb3 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 	}
 
-	if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-		PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+	if (ARK_DEBUG_CORE && nb != nb_pkts) {
+		ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
 			   " req: %" PRIU32
 			   " sent: %" PRIU32
 			   " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 	int qidx = queue_idx;
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size"
 			    " must be power of two %u (%s)\n",
 			    nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate tx "
+		ARK_PMD_LOG(ERR, "Failed to allocate tx "
 			    "queue memory in %s\n",
 			    __func__);
 		return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->meta_q == 0 || queue->bufs == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate "
+		ARK_PMD_LOG(ERR, "Failed to allocate "
 			    "queue memory in %s\n", __func__);
 		rte_free(queue->meta_q);
 		rte_free(queue->bufs);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..c3d7e7d39 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -28,66 +28,15 @@
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)	\
-	rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)			\
-	do {							\
-		if (0)						\
-			PMD_DRV_LOG(level, fmt, ## args);	\
-	} while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)				\
-	do {								\
-		if (0)							\
-			PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-	} while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 21f840f3c..8160c1de7 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 	if ((mpu->id.idnum != 0x2055504d) ||
 	    (mpu->hw.obj_size != obj_size) ||
 	    (version != 0x00003100)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU module not found as expected %08x"
 			    " \"%c%c%c%c %c%c%c%c\"\n",
 			    mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 			    mpu->id.id[2], mpu->id.id[3],
 			    mpu->id.ver[0], mpu->id.ver[1],
 			    mpu->id.ver[2], mpu->id.ver[3]);
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU HW num_queues: %u hw_depth %u,"
 			    " obj_size: %u, obj_per_mrr: %u"
 			    " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
 	ark_mpu_reset(mpu);
 
 	if (!rte_is_power_of_2(ring_size)) {
-		PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+		ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
 			    ring_size);
 		return -1;
 	}
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
 	/* DUMP to see that we have started */
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
 		      code, qid,
 		      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-		      " data 0x%08x_%08x 0x%08x_%08x\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+		      "\n",
 		      code,
 		      mpu->debug.state, mpu->debug.count,
-		      mpu->debug.reserved,
-		      mpu->debug.peek[1],
-		      mpu->debug.peek[0],
-		      mpu->debug.peek[3],
-		      mpu->debug.peek[2]
-		      );
-	PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-		      ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-		      code, qid,
-		      "PCI Request:", mpu->stats.pci_request,
-		      "Queue_empty", mpu->stats.q_empty,
-		      "Queue_q1", mpu->stats.q_q1,
-		      "Queue_q2", mpu->stats.q_q2,
-		      "Queue_q3", mpu->stats.q_q3,
-		      "Queue_q4", mpu->stats.q_q4,
-		      "Queue_full", mpu->stats.q_full
+		      mpu->debug.reserved
 		      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
 		      ARK_SU64X "\n",
 		      q_id,
 		      "ring_base", mpu->cfg.ring_base
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index ef861eea3..b8fb69497 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_chkr_inst",
 			   sizeof(struct ark_pkt_chkr_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
 		return inst;
 	}
 	inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+		ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
 	if (ark_pktchkr_is_gen_forever(handle)) {
-		PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
 			      " because gen_forever=1\n");
 		return -1;
 	}
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+		ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
 			      " internal pktgen to finish sending...\n",
 			      inst->ordinal);
-		PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+		ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
 			      inst->ordinal);
 	}
 	return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-	PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
 		      inst->sregs->pkts_rcvd);
-	PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+	ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
 		      inst->sregs->bytes_rcvd);
-	PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
 		      inst->sregs->pkts_ok);
-	PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
 		      inst->sregs->pkts_mismatch);
-	PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
 		      inst->sregs->pkts_err);
-	PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+	ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
 		      inst->sregs->first_mismatch);
-	PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
 		      inst->sregs->resync_events);
-	PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
 		      inst->sregs->pkts_missing);
-	PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
 		      inst->sregs->min_latency);
-	PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
 		      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
 		if (strcmp(id, toptions[i].opt) == 0)
 			return &toptions[i];
 	}
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "pktchkr: Could not find requested option!, option = %s\n",
 		    id);
 	return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
 		ark_pktchkr_stop(handle);
 
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
 			      options("port")->v.INT);
 		ark_pktchkr_run(handle);
 	}
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 1f2c8182a..25e121831 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
 			   sizeof(struct ark_pkt_dir_inst),
 			   0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index 2cae252d6..4a02662a4 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_gen_inst_pmd",
 			   sizeof(struct ark_pkt_gen_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
 	while (!ark_pktgen_paused(handle)) {
 		usleep(1000);
 		if (cnt++ > 100) {
-			PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+			ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
 				    inst->ordinal);
 			break;
 		}
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (!ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+		ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
 			      " and is not paused. No need to reset.\n",
 			      inst->ordinal);
 		return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Pktgen %d is not paused. Pausing first.\n",
 			      inst->ordinal);
 		ark_pktgen_pause(handle);
 	}
 
-	PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
 	inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
 	int wait_cycle = 10;
 
 	if (ark_pktgen_is_gen_forever(handle))
-		PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
 			    " because gen_forever=1\n");
 
 	while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Waiting for pktgen %d to finish sending...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
 			return &toptions[i];
 	}
 
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "Pktgen: Could not find requested option!, "
 		    "option = %s\n",
 		    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
 	if (options("reset")->v.BOOL)
 		ark_pktgen_reset(handle);
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
 				options("port")->v.INT);
 		ark_pktgen_run(handle);
 	}
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index bf1af4d61..ef9ccd070 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
 	if (rqp->err_count_other != 0)
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
 			    ARK_SU32
 			    ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
 			    "Error Count", rqp->err_cnt,
 			    "Error General", rqp->err_count_other);
 
-	PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+	ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
 		      ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 03f1922c6..a740d36d4 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
 	if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM structure looks incorrect %d vs %zd\n",
 			    ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
 		return -1;
 	}
 
 	if (udm->setup.const0 != ARK_UDM_CONST) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM module not found as expected 0x%08x\n",
 			    udm->setup.const0);
 		return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
 	status = ark_udm_stop(udm, 1);
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		udm->cfg.command = 4;
 		usleep(10);
 		udm->cfg.command = 3;
 		status = ark_udm_stop(udm, 0);
-		PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+		ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
 			      " and forced reset\n",
 			      __func__, status);
 	} else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_STATS_LOG(INFO, "UDM Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
 		      msg,
 		      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-	PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
 		      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
 		      ARK_SU64X ARK_SU32 "\n",
 		      q_id,
 		      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
 	struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-	PMD_STATS_LOG(INFO, "UDM Performance %s"
+	ARK_PMD_LOG(INFO, "UDM Performance %s"
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      "\n",
 		      msg,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-27 16:11 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-08-27 16:11   ` Ed Czeck
  2020-09-01 11:17     ` Ferruh Yigit
  0 siblings, 1 reply; 27+ messages in thread
From: Ed Czeck @ 2020-08-27 16:11 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
with a default value of 0.
Update documentation as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 16 ++++++++----
 drivers/net/ark/ark_ethdev_tx.c | 43 ++++++++++++++++++---------------
 drivers/net/ark/ark_logs.h      |  8 ------
 3 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index c3ffcbbc2..c7ed4095f 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -126,11 +126,10 @@ Configuration Information
 
   The following configuration options are available for the ARK PMD:
 
-   * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
-     of the ARK PMD driver in the DPDK compilation.
-
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
+   * **RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
+     packet length for tx packets to the FPGA.  Packets less than this
+     length are padded to meet the requirement. This allows padding to
+     be offloaded or remain in host software.
 
 
 Building DPDK
@@ -144,6 +143,13 @@ By default the ARK PMD library will be built into the DPDK library.
 For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
 documentation that comes with DPDK suite <linux_gsg>`.
 
+To build with a non-zero minimum tx packet length, set the above macro in your
+CFLAGS environment prior to the meson build step. I.e.,
+
+    export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
+    meson build
+
+
 Supported ARK RTL PCIe Instances
 --------------------------------
 
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 72624deb3..52ce2ed41 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -14,6 +14,11 @@
 #define ARK_TX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_TX_META_SIZE)
 #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
 
+#ifndef RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#define ARK_MIN_TX_PKTLEN 0
+#else
+#define ARK_MIN_TX_PKTLEN RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#endif
 
 /* ************************************************************************* */
 struct ark_tx_queue {
@@ -104,28 +109,28 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
-		if (ARK_TX_PAD_TO_60) {
-			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
-				/* this packet even if it is small can be split,
-				 * be sure to add to the end mbuf
+#if ARK_MIN_TX_PKTLEN != 0
+		if (unlikely(rte_pktmbuf_pkt_len(mbuf) < ARK_MIN_TX_PKTLEN)) {
+			/* this packet even if it is small can be split,
+			 * be sure to add to the end mbuf
+			 */
+			uint16_t to_add = ARK_MIN_TX_PKTLEN -
+				rte_pktmbuf_pkt_len(mbuf);
+			char *appended =
+				rte_pktmbuf_append(mbuf, to_add);
+
+			if (appended == 0) {
+				/* This packet is in error,
+				 * we cannot send it so just
+				 * count it and delete it.
 				 */
-				uint16_t to_add =
-					60 - rte_pktmbuf_pkt_len(mbuf);
-				char *appended =
-					rte_pktmbuf_append(mbuf, to_add);
-
-				if (appended == 0) {
-					/* This packet is in error,
-					 * we cannot send it so just
-					 * count it and delete it.
-					 */
-					queue->tx_errors += 1;
-					rte_pktmbuf_free(mbuf);
-					continue;
-				}
-				memset(appended, 0, to_add);
+				queue->tx_errors += 1;
+				rte_pktmbuf_free(mbuf);
+				continue;
 			}
+			memset(appended, 0, to_add);
 		}
+#endif
 
 		if (unlikely(mbuf->nb_segs != 1)) {
 			stat = eth_ark_tx_jumbo(queue, mbuf);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index c3d7e7d39..ca46d86c9 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -8,14 +8,6 @@
 #include <inttypes.h>
 #include <rte_log.h>
 
-
-/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
-#define ARK_TX_PAD_TO_60   0
-#endif
-
 /* system camel case definition changed to upper case */
 #define PRIU32 PRIu32
 #define PRIU64 PRIu64
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-08-27 16:11   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
@ 2020-09-01 11:17     ` Ferruh Yigit
  0 siblings, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-09-01 11:17 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 8/27/2020 5:11 PM, Ed Czeck wrote:
> Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
> with a default value of 0.
> Update documentation as needed.

Can you please use versions in the patches, it makes easier to follow them?
Like '[PATCH v4 2/2]', -v# option to "git format-patch" or "git send-email" does
it automatically for you.

Also a changelog history that documents what changes in each version helps, a
good place to put it is just below the '---' after sign off, this way although
it stays in the patch, it is removed automatically by git while merging the patch.

> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
> ---
>  doc/guides/nics/ark.rst         | 16 ++++++++----
>  drivers/net/ark/ark_ethdev_tx.c | 43 ++++++++++++++++++---------------
>  drivers/net/ark/ark_logs.h      |  8 ------
>  3 files changed, 35 insertions(+), 32 deletions(-)
> 
> diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
> index c3ffcbbc2..c7ed4095f 100644
> --- a/doc/guides/nics/ark.rst
> +++ b/doc/guides/nics/ark.rst
> @@ -126,11 +126,10 @@ Configuration Information
>  
>    The following configuration options are available for the ARK PMD:
>  
> -   * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
> -     of the ARK PMD driver in the DPDK compilation.
> -

Hi Ed,

Can you leave out this piece in this patch? Yes it will go away eventually, but
it is not related logically to this change. Let's leave removing it to the patch
that removes Makefile which will be removing all relevant pieces as a whole.

> -   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
> -     packets are padded to 60 bytes to support downstream MACS.
> +   * **RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
> +     packet length for tx packets to the FPGA.  Packets less than this
> +     length are padded to meet the requirement. This allows padding to
> +     be offloaded or remain in host software.
>  
>  
>  Building DPDK
> @@ -144,6 +143,13 @@ By default the ARK PMD library will be built into the DPDK library.
>  For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
>  documentation that comes with DPDK suite <linux_gsg>`.
>  
> +To build with a non-zero minimum tx packet length, set the above macro in your
> +CFLAGS environment prior to the meson build step. I.e.,
> +
> +    export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
> +    meson build
> +
> +
>  Supported ARK RTL PCIe Instances
>  --------------------------------
>  
> diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
> index 72624deb3..52ce2ed41 100644
> --- a/drivers/net/ark/ark_ethdev_tx.c
> +++ b/drivers/net/ark/ark_ethdev_tx.c
> @@ -14,6 +14,11 @@
>  #define ARK_TX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_TX_META_SIZE)
>  #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
>  
> +#ifndef RTE_LIBRTE_ARK_MIN_TX_PKTLEN
> +#define ARK_MIN_TX_PKTLEN 0
> +#else
> +#define ARK_MIN_TX_PKTLEN RTE_LIBRTE_ARK_MIN_TX_PKTLEN
> +#endif
>  
>  /* ************************************************************************* */
>  struct ark_tx_queue {
> @@ -104,28 +109,28 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>  	     ++nb) {
>  		mbuf = tx_pkts[nb];
>  
> -		if (ARK_TX_PAD_TO_60) {
> -			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
> -				/* this packet even if it is small can be split,
> -				 * be sure to add to the end mbuf
> +#if ARK_MIN_TX_PKTLEN != 0


Previous "if (...)" approach was better, compiler was checking the code
independent from 'RTE_LIBRTE_ARK_MIN_TX_PKTLEN' defined or not, and compiler was
optimizing out the code if it is not defined.
With the '#if' macro, we are losing the compiler check.

If there is no explicit reason, can you keep the old behavior here?



^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
                   ` (5 preceding siblings ...)
  2020-08-27 16:11 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-09-08 19:20 ` Ed Czeck
  2020-09-08 19:20   ` [dpdk-dev] [PATCH v7 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
  2020-09-09 13:33   ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
  6 siblings, 2 replies; 27+ messages in thread
From: Ed Czeck @ 2020-09-08 19:20 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
Review and adjust log levels and messages as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 doc/guides/nics/ark.rst         | 13 ------
 drivers/net/ark/ark_ddm.c       | 12 ++---
 drivers/net/ark/ark_ethdev.c    | 77 +++++++++++++++------------------
 drivers/net/ark/ark_ethdev_rx.c | 46 ++++++++++----------
 drivers/net/ark/ark_ethdev_tx.c | 10 ++---
 drivers/net/ark/ark_logs.h      | 63 +++------------------------
 drivers/net/ark/ark_mpu.c       | 32 ++++----------
 drivers/net/ark/ark_pktchkr.c   | 36 +++++++--------
 drivers/net/ark/ark_pktdir.c    |  2 +-
 drivers/net/ark/ark_pktgen.c    | 22 +++++-----
 drivers/net/ark/ark_rqp.c       |  4 +-
 drivers/net/ark/ark_udm.c       | 18 ++++----
 12 files changed, 125 insertions(+), 210 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 06e8c3374..c3ffcbbc2 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -132,19 +132,6 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
      packets are padded to 60 bytes to support downstream MACS.
 
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_RX** (default n): Enables or disables debug
-     logging and internal checking of RX ingress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TX** (default n): Enables or disables debug
-     logging and internal checking of TX egress logic within the ARK PMD driver.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS** (default n): Enables or disables debug
-     logging of detailed packet and performance statistics gathered in
-     the PMD and FPGA.
-
-   * **CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE** (default n): Enables or disables debug
-     logging of detailed PMD events and status.
-
 
 Building DPDK
 -------------
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 57026f8d1..91d1179d8 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -13,19 +13,19 @@ ark_ddm_verify(struct ark_ddm_t *ddm)
 {
 	uint32_t hw_const;
 	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
-		PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n",
+		ARK_PMD_LOG(ERR, "DDM structure looks incorrect %d vs %zd\n",
 			    ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
 		return -1;
 	}
 
 	hw_const = ddm->cfg.const0;
 	if (hw_const == ARK_DDM_CONST1) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module is version 1, "
 			    "PMD expects version 2\n");
 		return -1;
 	} else if (hw_const != ARK_DDM_CONST2) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: DDM module not found as expected 0x%08x\n",
 			    ddm->cfg.const0);
 		return -1;
@@ -63,7 +63,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
 	status = ark_ddm_stop(ddm, 1);
 
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		ddm->cfg.command = 4;
 		usleep(10);
@@ -87,7 +87,7 @@ ark_ddm_stats_reset(struct ark_ddm_t *ddm)
 void
 ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg)
 {
-	PMD_FUNC_LOG(DEBUG, "%s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "%s Stopped: %d\n", msg,
 		     ark_ddm_is_stopped(ddm)
 		     );
 }
@@ -97,7 +97,7 @@ ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg)
 {
 	struct ark_ddm_stats_t *stats = &ddm->stats;
 
-	PMD_STATS_LOG(INFO, "DDM Stats: %s"
+	ARK_PMD_LOG(INFO, "DDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64
 		      "\n", msg,
 		      "Bytes:", stats->tx_byte_count,
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd867..646427d0c 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -164,26 +164,26 @@ check_for_ext(struct ark_adapter *ark)
 	const char *dllpath = getenv("ARK_EXT_PATH");
 
 	if (dllpath == NULL) {
-		PMD_DEBUG_LOG(DEBUG, "ARK EXT NO dll path specified\n");
+		ARK_PMD_LOG(DEBUG, "EXT NO dll path specified\n");
 		return 0;
 	}
-	PMD_DRV_LOG(INFO, "ARK EXT found dll path at %s\n", dllpath);
+	ARK_PMD_LOG(NOTICE, "EXT found dll path at %s\n", dllpath);
 
 	/* Open and load the .so */
 	ark->d_handle = dlopen(dllpath, RTLD_LOCAL | RTLD_LAZY);
 	if (ark->d_handle == NULL) {
-		PMD_DRV_LOG(ERR, "Could not load user extension %s\n",
+		ARK_PMD_LOG(ERR, "Could not load user extension %s\n",
 			    dllpath);
 		return -1;
 	}
-	PMD_DRV_LOG(INFO, "SUCCESS: loaded user extension %s\n",
+	ARK_PMD_LOG(DEBUG, "SUCCESS: loaded user extension %s\n",
 			    dllpath);
 
 	/* Get the entry points */
 	ark->user_ext.dev_init =
 		(void *(*)(struct rte_eth_dev *, void *, int))
 		dlsym(ark->d_handle, "dev_init");
-	PMD_DEBUG_LOG(DEBUG, "device ext init pointer = %p\n",
+	ARK_PMD_LOG(DEBUG, "device ext init pointer = %p\n",
 		      ark->user_ext.dev_init);
 	ark->user_ext.dev_get_port_count =
 		(int (*)(struct rte_eth_dev *, void *))
@@ -249,7 +249,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	ark->eth_dev = dev;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
+	ARK_PMD_LOG(DEBUG, "\n");
 
 	/* Check to see if there is an extension that we need to load */
 	ret = check_for_ext(ark);
@@ -282,15 +282,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
 
-	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
 		      rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
-	PMD_DRV_LOG(INFO, "Arkville HW Commit_ID: %08x\n",
+	ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n",
 		    rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4]));
 
 	/* If HW sanity test fails, return an error */
 	if (ark->sysctrl.t32[4] != 0xcafef00d) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "HW Sanity test has failed, expected constant"
 			    " 0x%x, read 0x%x (%s)\n",
 			    0xcafef00d,
@@ -299,15 +299,15 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	}
 	if (ark->sysctrl.t32[3] != 0) {
 		if (ark_rqp_lasped(ark->rqpacing)) {
-			PMD_DRV_LOG(ERR, "Arkville Evaluation System - "
+			ARK_PMD_LOG(ERR, "Arkville Evaluation System - "
 				    "Timer has Expired\n");
 			return -1;
 		}
-		PMD_DRV_LOG(WARNING, "Arkville Evaluation System - "
+		ARK_PMD_LOG(WARNING, "Arkville Evaluation System - "
 			    "Timer is Running\n");
 	}
 
-	PMD_DRV_LOG(INFO,
+	ARK_PMD_LOG(DEBUG,
 		    "HW Sanity test has PASSED, expected constant"
 		    " 0x%x, read 0x%x (%s)\n",
 		    0xcafef00d, ark->sysctrl.t32[4], __func__);
@@ -321,7 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocated memory for storing mac address"
 			    );
 	}
@@ -330,7 +330,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		ark->user_data[dev->data->port_id] =
 			ark->user_ext.dev_init(dev, ark->a_bar, 0);
 		if (!ark->user_data[dev->data->port_id]) {
-			PMD_DRV_LOG(INFO,
+			ARK_PMD_LOG(WARNING,
 				    "Failed to initialize PMD extension!"
 				    " continuing without it\n");
 			memset(&ark->user_ext, 0, sizeof(struct ark_user_ext));
@@ -341,7 +341,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	if (pci_dev->device.devargs)
 		ret = eth_ark_check_args(ark, pci_dev->device.devargs->args);
 	else
-		PMD_DRV_LOG(INFO, "No Device args found\n");
+		ARK_PMD_LOG(INFO, "No Device args found\n");
 
 	if (ret)
 		goto error;
@@ -372,7 +372,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		/* reserve an ethdev entry */
 		eth_dev = rte_eth_dev_allocate(name);
 		if (!eth_dev) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Could not allocate eth_dev for port %d\n",
 				    p);
 			goto error;
@@ -389,7 +389,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		eth_dev->data->mac_addrs = rte_zmalloc(name,
 						RTE_ETHER_ADDR_LEN, 0);
 		if (!eth_dev->data->mac_addrs) {
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "Memory allocation for MAC failed!"
 				    " Exiting.\n");
 			goto error;
@@ -448,7 +448,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* UDM */
 	if (ark_udm_reset(ark->udm.v)) {
-		PMD_DRV_LOG(ERR, "Unable to stop and reset UDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop and reset UDM\n");
 		return -1;
 	}
 	/* Keep in reset until the MPU are cleared */
@@ -472,7 +472,7 @@ ark_config_device(struct rte_eth_dev *dev)
 
 	/* TX -- DDM */
 	if (ark_ddm_stop(ark->ddm.v, 1))
-		PMD_DRV_LOG(ERR, "Unable to stop DDM\n");
+		ARK_PMD_LOG(ERR, "Unable to stop DDM\n");
 
 	mpu = ark->mputx.v;
 	num_q = ark_api_num_queues(mpu);
@@ -515,7 +515,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
 static int
 eth_ark_dev_configure(struct rte_eth_dev *dev)
 {
-	PMD_FUNC_LOG(DEBUG, "\n");
 	struct ark_adapter *ark = dev->data->dev_private;
 
 	eth_ark_dev_set_link_up(dev);
@@ -545,8 +544,6 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	int i;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	/* RX Side */
 	/* start UDM */
 	ark_udm_start(ark->udm.v);
@@ -576,7 +573,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		 * This is only used for sanity checking with internal generator
 		 */
 		if (pthread_create(&thread, NULL, delay_pg_start, ark)) {
-			PMD_DRV_LOG(ERR, "Could not create pktgen "
+			ARK_PMD_LOG(ERR, "Could not create pktgen "
 				    "starter thread\n");
 			return -1;
 		}
@@ -597,8 +594,6 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	struct ark_adapter *ark = dev->data->dev_private;
 	struct ark_mpu_t *mpu;
 
-	PMD_FUNC_LOG(DEBUG, "\n");
-
 	if (ark->started == 0)
 		return;
 	ark->started = 0;
@@ -620,7 +615,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
 			uint16_t port = dev->data->port_id;
-			PMD_DRV_LOG(ERR,
+			ARK_PMD_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
 				    port, i);
@@ -635,7 +630,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "DDM stop anomaly. status:"
+		ARK_PMD_LOG(ERR, "DDM stop anomaly. status:"
 			    " %d iter: %u. (%s)\n",
 			    status,
 			    i,
@@ -657,7 +652,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 			break;
 	}
 	if (status || i != 0) {
-		PMD_DRV_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
+		ARK_PMD_LOG(ERR, "UDM stop anomaly. status %d iter: %u. (%s)\n",
 			    status, i, __func__);
 		ark_udm_dump(ark->udm.v, "Stop anomaly");
 
@@ -752,7 +747,7 @@ eth_ark_dev_info_get(struct rte_eth_dev *dev,
 static int
 eth_ark_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-	PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
+	ARK_PMD_LOG(DEBUG, "link status = %d\n",
 			dev->data->dev_link.link_status);
 	struct ark_adapter *ark = dev->data->dev_private;
 
@@ -887,20 +882,20 @@ static inline int
 process_pktdir_arg(const char *key, const char *value,
 		   void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	struct ark_adapter *ark =
 		(struct ark_adapter *)extra_args;
 
 	ark->pkt_dir_v = strtol(value, NULL, 16);
-	PMD_FUNC_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(DEBUG, "pkt_dir_v = 0x%x\n", ark->pkt_dir_v);
 	return 0;
 }
 
 static inline int
 process_file_args(const char *key, const char *value, void *extra_args)
 {
-	PMD_FUNC_LOG(DEBUG, "key = %s, value = %s\n",
+	ARK_PMD_LOG(DEBUG, "key = %s, value = %s\n",
 		    key, value);
 	char *args = (char *)extra_args;
 
@@ -911,7 +906,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	int first = 1;
 
 	if (file == NULL) {
-		PMD_DRV_LOG(ERR, "Unable to open "
+		ARK_PMD_LOG(ERR, "Unable to open "
 			    "config file %s\n", value);
 		return -1;
 	}
@@ -919,7 +914,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 	while (fgets(line, sizeof(line), file)) {
 		size += strlen(line);
 		if (size >= ARK_MAX_ARG_LEN) {
-			PMD_DRV_LOG(ERR, "Unable to parse file %s args, "
+			ARK_PMD_LOG(ERR, "Unable to parse file %s args, "
 				    "parameter list is too long\n", value);
 			fclose(file);
 			return -1;
@@ -931,7 +926,7 @@ process_file_args(const char *key, const char *value, void *extra_args)
 			strncat(args, line, ARK_MAX_ARG_LEN);
 		}
 	}
-	PMD_FUNC_LOG(DEBUG, "file = %s\n", args);
+	ARK_PMD_LOG(DEBUG, "file = %s\n", args);
 	fclose(file);
 	return 0;
 }
@@ -953,7 +948,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 
 	for (k_idx = 0; k_idx < kvlist->count; k_idx++) {
 		pair = &kvlist->pairs[k_idx];
-		PMD_FUNC_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
+		ARK_PMD_LOG(DEBUG, "**** Arg passed to PMD = %s:%s\n",
 			     pair->key,
 			     pair->value);
 	}
@@ -962,7 +957,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTDIR_ARG,
 			       &process_pktdir_arg,
 			       ark) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTDIR_ARG);
 		goto free_kvlist;
 	}
 
@@ -970,7 +965,7 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTGEN_ARG,
 			       &process_file_args,
 			       ark->pkt_gen_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTGEN_ARG);
 		goto free_kvlist;
 	}
 
@@ -978,17 +973,17 @@ eth_ark_check_args(struct ark_adapter *ark, const char *params)
 			       ARK_PKTCHKR_ARG,
 			       &process_file_args,
 			       ark->pkt_chkr_args) != 0) {
-		PMD_DRV_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
+		ARK_PMD_LOG(ERR, "Unable to parse arg %s\n", ARK_PKTCHKR_ARG);
 		goto free_kvlist;
 	}
 
-	PMD_DRV_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
+	ARK_PMD_LOG(INFO, "packet director set to 0x%x\n", ark->pkt_dir_v);
 	/* Setup the packet director */
 	ark_pktdir_setup(ark->pd, ark->pkt_dir_v);
 
 	/* Setup the packet generator */
 	if (ark->pkt_gen_args[0]) {
-		PMD_DRV_LOG(INFO, "Setting up the packet generator\n");
+		ARK_PMD_LOG(DEBUG, "Setting up the packet generator\n");
 		ark_pktgen_parse(ark->pkt_gen_args);
 		ark_pktgen_reset(ark->pg);
 		ark_pktgen_setup(ark->pg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 4d518d558..2f8d05099 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -81,7 +81,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
 
 	/* Verify HW */
 	if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
-		PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
+		ARK_PMD_LOG(ERR, "Illegal configuration rx queue\n");
 		return -1;
 	}
 
@@ -137,19 +137,19 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 	if (rx_conf != NULL && warning1 == 0) {
 		warning1 = 1;
-		PMD_DRV_LOG(INFO,
+		ARK_PMD_LOG(NOTICE,
 			    "Arkville ignores rte_eth_rxconf argument.\n");
 	}
 
 	if (RTE_PKTMBUF_HEADROOM < ARK_RX_META_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Error: DPDK Arkville requires head room > %d bytes (%s)\n",
 			    ARK_RX_META_SIZE, __func__);
 		return -1;		/* ERROR CODE */
 	}
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size must be power of two %u (%s)\n",
 			    nb_desc, __func__);
 		return -1;		/* ERROR CODE */
@@ -161,7 +161,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
+		ARK_PMD_LOG(ERR, "Failed to allocate memory in %s\n", __func__);
 		return -ENOMEM;
 	}
 
@@ -184,7 +184,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->reserve_q == 0 || queue->paddress_q == 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "Failed to allocate queue memory in %s\n",
 			    __func__);
 		rte_free(queue->reserve_q);
@@ -201,7 +201,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	status = eth_ark_rx_seed_mbufs(queue);
 
 	if (queue->seed_index != nb_desc) {
-		PMD_DRV_LOG(ERR, "ARK: Failed to allocate %u mbufs for RX queue %d\n",
+		ARK_PMD_LOG(ERR, "Failed to allocate %u mbufs for RX queue %d\n",
 			    nb_desc, qidx);
 		status = -1;
 	}
@@ -212,7 +212,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	if (unlikely(status != 0)) {
 		struct rte_mbuf **mbuf;
 
-		PMD_DRV_LOG(ERR, "Failed to initialize RX queue %d %s\n",
+		ARK_PMD_LOG(ERR, "Failed to initialize RX queue %d %s\n",
 			    qidx,
 			    __func__);
 		/* Free the mbufs allocated */
@@ -274,10 +274,10 @@ eth_ark_recv_pkts(void *rx_queue,
 		mbuf->timestamp = meta->timestamp;
 		mbuf->udata64 = meta->user_data;
 
-		if (ARK_RX_DEBUG) {	/* debug sanity checks */
+		if (ARK_DEBUG_CORE) {	/* debug sanity checks */
 			if ((meta->pkt_len > (1024 * 16)) ||
 			    (meta->pkt_len == 0)) {
-				PMD_RX_LOG(DEBUG, "RX: Bad Meta Q: %u"
+				ARK_PMD_LOG(DEBUG, "RX: Bad Meta Q: %u"
 					   " cons: %" PRIU32
 					   " prod: %" PRIU32
 					   " seed_index %" PRIU32
@@ -288,7 +288,7 @@ eth_ark_recv_pkts(void *rx_queue,
 					   queue->seed_index);
 
 
-				PMD_RX_LOG(DEBUG, "       :  UDM"
+				ARK_PMD_LOG(DEBUG, "       :  UDM"
 					   " prod: %" PRIU32
 					   " len: %u\n",
 					   queue->udm->rt_cfg.prod_idx,
@@ -359,7 +359,7 @@ eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 		mbuf_prev = mbuf;
 		mbuf->data_len = data_len;
 		mbuf->data_off = 0;
-		if (ARK_RX_DEBUG)
+		if (ARK_DEBUG_CORE)
 			mbuf->seqn = cons_index;	/* for debug only */
 
 		cons_index += 1;
@@ -463,7 +463,7 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 		}
 	}
 
-	if (ARK_RX_DEBUG) {		/* DEBUG */
+	if (ARK_DEBUG_CORE) {		/* DEBUG */
 		while (count != nb) {
 			struct rte_mbuf *mbuf_init =
 				queue->reserve_q[seed_m + count];
@@ -523,7 +523,7 @@ eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
 	*pnb = 64U;
 	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
 	if (status != 0) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(NOTICE,
 			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
 			    " %u free buffers remaining in queue\n",
 			    *pnb, queue->queue_index,
@@ -616,7 +616,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 
 	if (!ark_udm_is_flushed(ark->udm.v)) {
 		/* restart the MPUs */
-		PMD_DRV_LOG(ERR, "ARK: %s UDM not flushed\n", __func__);
+		ARK_PMD_LOG(NOTICE, "UDM not flushed -- forcing flush\n");
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			queue = (struct ark_rx_queue *)dev->data->rx_queues[i];
 			if (queue == 0)
@@ -630,7 +630,7 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev)
 		/* Wait to allow data to pass */
 		usleep(100);
 
-		PMD_DEBUG_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
+		ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n",
 				ark_udm_is_flushed(ark->udm.v));
 	}
 	ark_udm_reset(ark->udm.v);
@@ -641,8 +641,8 @@ ark_ethdev_rx_dump(const char *name, struct ark_rx_queue *queue)
 {
 	if (queue == NULL)
 		return;
-	PMD_DEBUG_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
-	PMD_DEBUG_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
+	ARK_PMD_LOG(DEBUG, "RX QUEUE %d -- %s", queue->phys_qid, name);
+	ARK_PMD_LOG(DEBUG, ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 "\n",
 			"queue_size", queue->queue_size,
 			"seed_index", queue->seed_index,
 			"prod_index", queue->prod_index,
@@ -666,15 +666,15 @@ dump_mbuf_data(struct rte_mbuf *mbuf, uint16_t lo, uint16_t hi)
 {
 	uint16_t i, j;
 
-	PMD_DRV_LOG(INFO, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n", mbuf,
-		mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
+	ARK_PMD_LOG(DEBUG, " MBUF: %p len %d, off: %d, seq: %" PRIU32 "\n",
+		    mbuf, mbuf->pkt_len, mbuf->data_off, mbuf->seqn);
 	for (i = lo; i < hi; i += 16) {
 		uint8_t *dp = RTE_PTR_ADD(mbuf->buf_addr, i);
 
-		PMD_DRV_LOG(INFO, "  %6d:  ", i);
+		ARK_PMD_LOG(DEBUG, "  %6d:  ", i);
 		for (j = 0; j < 16; j++)
-			PMD_DRV_LOG(INFO, " %02x", dp[j]);
+			ARK_PMD_LOG(DEBUG, " %02x", dp[j]);
 
-		PMD_DRV_LOG(INFO, "\n");
+		ARK_PMD_LOG(DEBUG, "\n");
 	}
 }
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 289668774..72624deb3 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -143,8 +143,8 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 	}
 
-	if (ARK_TX_DEBUG && (nb != nb_pkts)) {
-		PMD_TX_LOG(DEBUG, "TX: Failure to send:"
+	if (ARK_DEBUG_CORE && nb != nb_pkts) {
+		ARK_PMD_LOG(DEBUG, "TX: Failure to send:"
 			   " req: %" PRIU32
 			   " sent: %" PRIU32
 			   " prod: %" PRIU32
@@ -214,7 +214,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 	int qidx = queue_idx;
 
 	if (!rte_is_power_of_2(nb_desc)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "DPDK Arkville configuration queue size"
 			    " must be power of two %u (%s)\n",
 			    nb_desc, __func__);
@@ -227,7 +227,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   64,
 				   socket_id);
 	if (queue == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate tx "
+		ARK_PMD_LOG(ERR, "Failed to allocate tx "
 			    "queue memory in %s\n",
 			    __func__);
 		return -ENOMEM;
@@ -252,7 +252,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
 				   socket_id);
 
 	if (queue->meta_q == 0 || queue->bufs == 0) {
-		PMD_DRV_LOG(ERR, "Failed to allocate "
+		ARK_PMD_LOG(ERR, "Failed to allocate "
 			    "queue memory in %s\n", __func__);
 		rte_free(queue->meta_q);
 		rte_free(queue->bufs);
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index 44aac6102..c3d7e7d39 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -28,66 +28,15 @@
 
 extern int ark_logtype;
 
-#define PMD_DRV_LOG(level, fmt, args...)	\
-	rte_log(RTE_LOG_ ##level, ark_logtype, fmt, ## args)
+#define ARK_PMD_LOG(level, fmt, args...)	\
+	rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args)
 
-/* Conditional trace definitions */
-#define ARK_TRACE_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, fmt, ## args)
 
-/* This pattern allows compiler check arguments even if disabled  */
-#define ARK_TRACE_OFF(level, fmt, args...)			\
-	do {							\
-		if (0)						\
-			PMD_DRV_LOG(level, fmt, ## args);	\
-	} while (0)
-
-/* tracing including the function name */
-#define ARK_FUNC_ON(level, fmt, args...) \
-	PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args)
-
-/* tracing including the function name */
-#define ARK_FUNC_OFF(level, fmt, args...)				\
-	do {								\
-		if (0)							\
-			PMD_DRV_LOG(level, "%s(): " fmt, __func__, ## args); \
-	} while (0)
-
-
-/* Debug macro for tracing full behavior, function tracing and messages*/
-#ifdef RTE_LIBRTE_ARK_DEBUG_TRACE
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_ON(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_FUNC_LOG(level, fmt, ...) ARK_FUNC_OFF(level, fmt, ##__VA_ARGS__)
-#define PMD_DEBUG_LOG(level, fmt, ...) ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for reporting FPGA statistics */
-#ifdef RTE_LIBRTE_ARK_DEBUG_STATS
-#define PMD_STATS_LOG(level, fmt, ...) ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define PMD_STATS_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-
-/* Debug macro for RX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_RX
-#define ARK_RX_DEBUG 1
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
-#else
-#define ARK_RX_DEBUG 0
-#define PMD_RX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
-#endif
-
-/* Debug macro for TX path */
-#ifdef RTE_LIBRTE_ARK_DEBUG_TX
-#define ARK_TX_DEBUG       1
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_ON(level, fmt, ##__VA_ARGS__)
+/* Debug macro to enable core debug code */
+#ifdef RTE_LIBRTE_ETHDEV_DEBUG
+#define ARK_DEBUG_CORE 1
 #else
-#define ARK_TX_DEBUG       0
-#define PMD_TX_LOG(level, fmt, ...)  ARK_TRACE_OFF(level, fmt, ##__VA_ARGS__)
+#define ARK_DEBUG_CORE 0
 #endif
 
 #endif
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index 21f840f3c..8160c1de7 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -28,7 +28,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 	if ((mpu->id.idnum != 0x2055504d) ||
 	    (mpu->hw.obj_size != obj_size) ||
 	    (version != 0x00003100)) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU module not found as expected %08x"
 			    " \"%c%c%c%c %c%c%c%c\"\n",
 			    mpu->id.idnum,
@@ -36,7 +36,7 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size)
 			    mpu->id.id[2], mpu->id.id[3],
 			    mpu->id.ver[0], mpu->id.ver[1],
 			    mpu->id.ver[2], mpu->id.ver[3]);
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "   MPU HW num_queues: %u hw_depth %u,"
 			    " obj_size: %u, obj_per_mrr: %u"
 			    " Expected size %u\n",
@@ -95,7 +95,7 @@ ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
 	ark_mpu_reset(mpu);
 
 	if (!rte_is_power_of_2(ring_size)) {
-		PMD_DRV_LOG(ERR, "ARK: Invalid ring size for MPU %d\n",
+		ARK_PMD_LOG(ERR, "Invalid ring size for MPU %d\n",
 			    ring_size);
 		return -1;
 	}
@@ -114,37 +114,21 @@ void
 ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid)
 {
 	/* DUMP to see that we have started */
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n",
 		      code, qid,
 		      mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index);
-	PMD_DEBUG_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
-		      " data 0x%08x_%08x 0x%08x_%08x\n",
+	ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d"
+		      "\n",
 		      code,
 		      mpu->debug.state, mpu->debug.count,
-		      mpu->debug.reserved,
-		      mpu->debug.peek[1],
-		      mpu->debug.peek[0],
-		      mpu->debug.peek[3],
-		      mpu->debug.peek[2]
-		      );
-	PMD_STATS_LOG(INFO, "MPU: %s Q: %3u"
-		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64
-		      ARK_SU64 ARK_SU64 ARK_SU64 "\n",
-		      code, qid,
-		      "PCI Request:", mpu->stats.pci_request,
-		      "Queue_empty", mpu->stats.q_empty,
-		      "Queue_q1", mpu->stats.q_q1,
-		      "Queue_q2", mpu->stats.q_q2,
-		      "Queue_q3", mpu->stats.q_q3,
-		      "Queue_q4", mpu->stats.q_q4,
-		      "Queue_full", mpu->stats.q_full
+		      mpu->debug.reserved
 		      );
 }
 
 void
 ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "MPU Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "MPU Setup Q: %u"
 		      ARK_SU64X "\n",
 		      q_id,
 		      "ring_base", mpu->cfg.ring_base
diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c
index ef861eea3..b8fb69497 100644
--- a/drivers/net/ark/ark_pktchkr.c
+++ b/drivers/net/ark/ark_pktchkr.c
@@ -85,7 +85,7 @@ ark_pktchkr_init(void *addr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_chkr_inst",
 			   sizeof(struct ark_pkt_chkr_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
 		return inst;
 	}
 	inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
@@ -130,10 +130,10 @@ ark_pktchkr_stop(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
+		ARK_PMD_LOG(DEBUG, "Waiting for pktchk %d to stop...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktchk %d stopped.\n", inst->ordinal);
 }
 
 int
@@ -189,7 +189,7 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
 	if (ark_pktchkr_is_gen_forever(handle)) {
-		PMD_DEBUG_LOG(ERR, "Pktchk wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktchk wait_done will not terminate"
 			      " because gen_forever=1\n");
 		return -1;
 	}
@@ -198,10 +198,10 @@ ark_pktchkr_wait_done(ark_pkt_chkr_t handle)
 	while (!ark_pktchkr_stopped(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG, "Waiting for packet checker %d's"
+		ARK_PMD_LOG(DEBUG, "Waiting for packet checker %d's"
 			      " internal pktgen to finish sending...\n",
 			      inst->ordinal);
-		PMD_DEBUG_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
+		ARK_PMD_LOG(DEBUG, "Pktchk %d's pktgen done.\n",
 			      inst->ordinal);
 	}
 	return 0;
@@ -296,25 +296,25 @@ ark_pktchkr_dump_stats(ark_pkt_chkr_t handle)
 {
 	struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle;
 
-	PMD_STATS_LOG(INFO, "pkts_rcvd      = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_rcvd      = (%'u)\n",
 		      inst->sregs->pkts_rcvd);
-	PMD_STATS_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
+	ARK_PMD_LOG(INFO, "bytes_rcvd     = (%'" PRIU64 ")\n",
 		      inst->sregs->bytes_rcvd);
-	PMD_STATS_LOG(INFO, "pkts_ok        = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_ok        = (%'u)\n",
 		      inst->sregs->pkts_ok);
-	PMD_STATS_LOG(INFO, "pkts_mismatch  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_mismatch  = (%'u)\n",
 		      inst->sregs->pkts_mismatch);
-	PMD_STATS_LOG(INFO, "pkts_err       = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_err       = (%'u)\n",
 		      inst->sregs->pkts_err);
-	PMD_STATS_LOG(INFO, "first_mismatch = (%'u)\n",
+	ARK_PMD_LOG(INFO, "first_mismatch = (%'u)\n",
 		      inst->sregs->first_mismatch);
-	PMD_STATS_LOG(INFO, "resync_events  = (%'u)\n",
+	ARK_PMD_LOG(INFO, "resync_events  = (%'u)\n",
 		      inst->sregs->resync_events);
-	PMD_STATS_LOG(INFO, "pkts_missing   = (%'u)\n",
+	ARK_PMD_LOG(INFO, "pkts_missing   = (%'u)\n",
 		      inst->sregs->pkts_missing);
-	PMD_STATS_LOG(INFO, "min_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "min_latency    = (%'u)\n",
 		      inst->sregs->min_latency);
-	PMD_STATS_LOG(INFO, "max_latency    = (%'u)\n",
+	ARK_PMD_LOG(INFO, "max_latency    = (%'u)\n",
 		      inst->sregs->max_latency);
 }
 
@@ -327,7 +327,7 @@ options(const char *id)
 		if (strcmp(id, toptions[i].opt) == 0)
 			return &toptions[i];
 	}
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "pktchkr: Could not find requested option!, option = %s\n",
 		    id);
 	return NULL;
@@ -443,7 +443,7 @@ ark_pktchkr_setup(ark_pkt_chkr_t handle)
 		ark_pktchkr_stop(handle);
 
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet checker on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet checker on port %d\n",
 			      options("port")->v.INT);
 		ark_pktchkr_run(handle);
 	}
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 1f2c8182a..25e121831 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -18,7 +18,7 @@ ark_pktdir_init(void *base)
 			   sizeof(struct ark_pkt_dir_inst),
 			   0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_dir_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c
index 2cae252d6..4a02662a4 100644
--- a/drivers/net/ark/ark_pktgen.c
+++ b/drivers/net/ark/ark_pktgen.c
@@ -83,7 +83,7 @@ ark_pktgen_init(void *adr, int ord, int l2_mode)
 		rte_malloc("ark_pkt_gen_inst_pmd",
 			   sizeof(struct ark_pkt_gen_inst), 0);
 	if (inst == NULL) {
-		PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
+		ARK_PMD_LOG(ERR, "Failed to malloc ark_pkt_gen_inst.\n");
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_gen_regs *)adr;
@@ -126,12 +126,12 @@ ark_pktgen_pause(ark_pkt_gen_t handle)
 	while (!ark_pktgen_paused(handle)) {
 		usleep(1000);
 		if (cnt++ > 100) {
-			PMD_DRV_LOG(ERR, "Pktgen %d failed to pause.\n",
+			ARK_PMD_LOG(NOTICE, "Pktgen %d failed to pause.\n",
 				    inst->ordinal);
 			break;
 		}
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d paused.\n", inst->ordinal);
 }
 
 void
@@ -141,7 +141,7 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (!ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG, "Pktgen %d is not running"
+		ARK_PMD_LOG(DEBUG, "Pktgen %d is not running"
 			      " and is not paused. No need to reset.\n",
 			      inst->ordinal);
 		return;
@@ -149,13 +149,13 @@ ark_pktgen_reset(ark_pkt_gen_t handle)
 
 	if (ark_pktgen_is_running(handle) &&
 	    !ark_pktgen_paused(handle)) {
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Pktgen %d is not paused. Pausing first.\n",
 			      inst->ordinal);
 		ark_pktgen_pause(handle);
 	}
 
-	PMD_DEBUG_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Resetting pktgen %d.\n", inst->ordinal);
 	inst->regs->pkt_start_stop = (1 << 8);
 }
 
@@ -193,17 +193,17 @@ ark_pktgen_wait_done(ark_pkt_gen_t handle)
 	int wait_cycle = 10;
 
 	if (ark_pktgen_is_gen_forever(handle))
-		PMD_DRV_LOG(ERR, "Pktgen wait_done will not terminate"
+		ARK_PMD_LOG(NOTICE, "Pktgen wait_done will not terminate"
 			    " because gen_forever=1\n");
 
 	while (!ark_pktgen_tx_done(handle) && (wait_cycle > 0)) {
 		usleep(1000);
 		wait_cycle--;
-		PMD_DEBUG_LOG(DEBUG,
+		ARK_PMD_LOG(DEBUG,
 			      "Waiting for pktgen %d to finish sending...\n",
 			      inst->ordinal);
 	}
-	PMD_DEBUG_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
+	ARK_PMD_LOG(DEBUG, "Pktgen %d done.\n", inst->ordinal);
 }
 
 uint32_t
@@ -306,7 +306,7 @@ options(const char *id)
 			return &toptions[i];
 	}
 
-	PMD_DRV_LOG(ERR,
+	ARK_PMD_LOG(ERR,
 		    "Pktgen: Could not find requested option!, "
 		    "option = %s\n",
 		    id
@@ -465,7 +465,7 @@ ark_pktgen_setup(ark_pkt_gen_t handle)
 	if (options("reset")->v.BOOL)
 		ark_pktgen_reset(handle);
 	if (options("run")->v.BOOL) {
-		PMD_DEBUG_LOG(DEBUG, "Starting packet generator on port %d\n",
+		ARK_PMD_LOG(DEBUG, "Starting packet generator on port %d\n",
 				options("port")->v.INT);
 		ark_pktgen_run(handle);
 	}
diff --git a/drivers/net/ark/ark_rqp.c b/drivers/net/ark/ark_rqp.c
index bf1af4d61..ef9ccd070 100644
--- a/drivers/net/ark/ark_rqp.c
+++ b/drivers/net/ark/ark_rqp.c
@@ -23,7 +23,7 @@ void
 ark_rqp_dump(struct ark_rqpace_t *rqp)
 {
 	if (rqp->err_count_other != 0)
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "RQP Errors noted: ctrl: %d cplh_hmax %d cpld_max %d"
 			    ARK_SU32
 			    ARK_SU32 "\n",
@@ -31,7 +31,7 @@ ark_rqp_dump(struct ark_rqpace_t *rqp)
 			    "Error Count", rqp->err_cnt,
 			    "Error General", rqp->err_count_other);
 
-	PMD_STATS_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
+	ARK_PMD_LOG(INFO, "RQP Dump: ctrl: %d cplh_hmax %d cpld_max %d"
 		      ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 03f1922c6..a740d36d4 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -11,14 +11,14 @@ int
 ark_udm_verify(struct ark_udm_t *udm)
 {
 	if (sizeof(struct ark_udm_t) != ARK_UDM_EXPECT_SIZE) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM structure looks incorrect %d vs %zd\n",
 			    ARK_UDM_EXPECT_SIZE, sizeof(struct ark_udm_t));
 		return -1;
 	}
 
 	if (udm->setup.const0 != ARK_UDM_CONST) {
-		PMD_DRV_LOG(ERR,
+		ARK_PMD_LOG(ERR,
 			    "ARK: UDM module not found as expected 0x%08x\n",
 			    udm->setup.const0);
 		return -1;
@@ -49,13 +49,13 @@ ark_udm_reset(struct ark_udm_t *udm)
 
 	status = ark_udm_stop(udm, 1);
 	if (status != 0) {
-		PMD_DEBUG_LOG(INFO, "%s  stop failed  doing forced reset\n",
+		ARK_PMD_LOG(NOTICE, "%s  stop failed  doing forced reset\n",
 			      __func__);
 		udm->cfg.command = 4;
 		usleep(10);
 		udm->cfg.command = 3;
 		status = ark_udm_stop(udm, 0);
-		PMD_DEBUG_LOG(INFO, "%s  stop status %d post failure"
+		ARK_PMD_LOG(INFO, "%s  stop status %d post failure"
 			      " and forced reset\n",
 			      __func__, status);
 	} else {
@@ -125,7 +125,7 @@ ark_udm_packets(struct ark_udm_t *udm)
 void
 ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_STATS_LOG(INFO, "UDM Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Stats: %s"
 		      ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 ARK_SU64 "\n",
 		      msg,
 		      "Pkts Received", udm->stats.rx_packet_count,
@@ -138,7 +138,7 @@ ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg)
 void
 ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 {
-	PMD_STATS_LOG(INFO, "UDM Queue %3u Stats: %s"
+	ARK_PMD_LOG(INFO, "UDM Queue %3u Stats: %s"
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 ARK_SU64
 		      ARK_SU64 "\n",
@@ -153,14 +153,14 @@ ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg, uint16_t qid)
 void
 ark_udm_dump(struct ark_udm_t *udm, const char *msg)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
+	ARK_PMD_LOG(DEBUG, "UDM Dump: %s Stopped: %d\n", msg,
 		      udm->cfg.stop_flushed);
 }
 
 void
 ark_udm_dump_setup(struct ark_udm_t *udm, uint16_t q_id)
 {
-	PMD_DEBUG_LOG(DEBUG, "UDM Setup Q: %u"
+	ARK_PMD_LOG(DEBUG, "UDM Setup Q: %u"
 		      ARK_SU64X ARK_SU32 "\n",
 		      q_id,
 		      "hw_prod_addr", udm->rt_cfg.hw_prod_addr,
@@ -172,7 +172,7 @@ ark_udm_dump_perf(struct ark_udm_t *udm, const char *msg)
 {
 	struct ark_udm_pcibp_t *bp = &udm->pcibp;
 
-	PMD_STATS_LOG(INFO, "UDM Performance %s"
+	ARK_PMD_LOG(INFO, "UDM Performance %s"
 		      ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32 ARK_SU32
 		      "\n",
 		      msg,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [dpdk-dev] [PATCH v7 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro
  2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
@ 2020-09-08 19:20   ` Ed Czeck
  2020-09-09 13:33   ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
  1 sibling, 0 replies; 27+ messages in thread
From: Ed Czeck @ 2020-09-08 19:20 UTC (permalink / raw)
  To: dev, ferruh.yigit, bruce.richardson; +Cc: shepard.siegel, john.miller, Ed Czeck

Replace behavior with RTE_LIBRTE_ARK_MIN_TX_PKTLEN
with a default value of 0.
Update documentation as needed.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
v7:
  -- add ARK_MIN_TX_PKTLEN to conditional expression
    to avoid compile warning with icc.
  -- restore CONFIG_RTE_LIBRTE_ARK_PMD doc as requested.
---
 doc/guides/nics/ark.rst         | 13 ++++++++--
 drivers/net/ark/ark_ethdev_tx.c | 43 ++++++++++++++++++---------------
 drivers/net/ark/ark_logs.h      |  8 ------
 3 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index c3ffcbbc2..358e7f624 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -129,8 +129,10 @@ Configuration Information
    * **CONFIG_RTE_LIBRTE_ARK_PMD** (default y): Enables or disables inclusion
      of the ARK PMD driver in the DPDK compilation.
 
-   * **CONFIG_RTE_LIBRTE_ARK_PAD_TX** (default y):  When enabled TX
-     packets are padded to 60 bytes to support downstream MACS.
+   * **RTE_LIBRTE_ARK_MIN_TX_PKTLEN** (default 0): Sets the minimum
+     packet length for tx packets to the FPGA.  Packets less than this
+     length are padded to meet the requirement. This allows padding to
+     be offloaded or remain in host software.
 
 
 Building DPDK
@@ -144,6 +146,13 @@ By default the ARK PMD library will be built into the DPDK library.
 For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
 documentation that comes with DPDK suite <linux_gsg>`.
 
+To build with a non-zero minimum tx packet length, set the above macro in your
+CFLAGS environment prior to the meson build step. I.e.,
+
+    export CFLAGS="-DRTE_LIBRTE_ARK_MIN_TX_PKTLEN=60"
+    meson build
+
+
 Supported ARK RTL PCIe Instances
 --------------------------------
 
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 72624deb3..a0e35af88 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -14,6 +14,11 @@
 #define ARK_TX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_TX_META_SIZE)
 #define ARK_TX_MAX_NOCHAIN (RTE_MBUF_DEFAULT_DATAROOM)
 
+#ifndef RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#define ARK_MIN_TX_PKTLEN 0
+#else
+#define ARK_MIN_TX_PKTLEN RTE_LIBRTE_ARK_MIN_TX_PKTLEN
+#endif
 
 /* ************************************************************************* */
 struct ark_tx_queue {
@@ -91,6 +96,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint32_t prod_index_limit;
 	int stat;
 	uint16_t nb;
+	const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
 
 	queue = (struct ark_tx_queue *)vtxq;
 
@@ -104,27 +110,26 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	     ++nb) {
 		mbuf = tx_pkts[nb];
 
-		if (ARK_TX_PAD_TO_60) {
-			if (unlikely(rte_pktmbuf_pkt_len(mbuf) < 60)) {
-				/* this packet even if it is small can be split,
-				 * be sure to add to the end mbuf
+		if (min_pkt_len &&
+		    unlikely(rte_pktmbuf_pkt_len(mbuf) < min_pkt_len)) {
+			/* this packet even if it is small can be split,
+			 * be sure to add to the end mbuf
+			 */
+			uint16_t to_add = min_pkt_len -
+				rte_pktmbuf_pkt_len(mbuf);
+			char *appended =
+				rte_pktmbuf_append(mbuf, to_add);
+
+			if (appended == 0) {
+				/* This packet is in error,
+				 * we cannot send it so just
+				 * count it and delete it.
 				 */
-				uint16_t to_add =
-					60 - rte_pktmbuf_pkt_len(mbuf);
-				char *appended =
-					rte_pktmbuf_append(mbuf, to_add);
-
-				if (appended == 0) {
-					/* This packet is in error,
-					 * we cannot send it so just
-					 * count it and delete it.
-					 */
-					queue->tx_errors += 1;
-					rte_pktmbuf_free(mbuf);
-					continue;
-				}
-				memset(appended, 0, to_add);
+				queue->tx_errors += 1;
+				rte_pktmbuf_free(mbuf);
+				continue;
 			}
+			memset(appended, 0, to_add);
 		}
 
 		if (unlikely(mbuf->nb_segs != 1)) {
diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h
index c3d7e7d39..ca46d86c9 100644
--- a/drivers/net/ark/ark_logs.h
+++ b/drivers/net/ark/ark_logs.h
@@ -8,14 +8,6 @@
 #include <inttypes.h>
 #include <rte_log.h>
 
-
-/* Configuration option to pad TX packets to 60 bytes */
-#ifdef RTE_LIBRTE_ARK_PAD_TX
-#define ARK_TX_PAD_TO_60   1
-#else
-#define ARK_TX_PAD_TO_60   0
-#endif
-
 /* system camel case definition changed to upper case */
 #define PRIU32 PRIu32
 #define PRIU64 PRIu64
-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control
  2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
  2020-09-08 19:20   ` [dpdk-dev] [PATCH v7 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
@ 2020-09-09 13:33   ` Ferruh Yigit
  1 sibling, 0 replies; 27+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:33 UTC (permalink / raw)
  To: Ed Czeck, dev, bruce.richardson; +Cc: shepard.siegel, john.miller

On 9/8/2020 8:20 PM, Ed Czeck wrote:
> Use ARK_PMD_LOG in place of PMD_DRV_LOG, PMD_DEBUG_LOG, PMD_FUNC_LOG,
> PMD_STATS_LOG, PMD_RX_LOG, and PMD_TX_LOG.
> Review and adjust log levels and messages as needed.
> 
> Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-09-09 13:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 15:35 [dpdk-dev] [PATCH] net/ark: fix meson build Ed Czeck
2020-08-19 16:29 ` Ferruh Yigit
2020-08-19 20:45 ` Ed Czeck
2020-08-20 11:16   ` Ferruh Yigit
2020-08-20 15:41     ` Ed Czeck
2020-08-21  9:44       ` Ferruh Yigit
2020-08-20 21:55 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-20 21:55   ` [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro Ed Czeck
2020-08-21  9:50     ` Ferruh Yigit
2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-24 13:36   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-08-24 14:55     ` Ferruh Yigit
2020-08-24 21:51       ` Ed Czeck
2020-08-25  7:43         ` Ferruh Yigit
2020-08-24 14:37   ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
2020-08-24 14:40     ` Bruce Richardson
2020-08-24 15:09       ` Ferruh Yigit
2020-08-24 21:40         ` Ed Czeck
2020-08-25  7:44           ` Ferruh Yigit
2020-08-26 15:24 ` Ed Czeck
2020-08-26 15:24   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-08-27 16:11 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-27 16:11   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-09-01 11:17     ` Ferruh Yigit
2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-09-08 19:20   ` [dpdk-dev] [PATCH v7 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-09-09 13:33   ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git