diff mbox series

common/cnxk: update NIX and NPA dump function

Message ID 20211220132625.13496-1-rbhansali@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series common/cnxk: update NIX and NPA dump function | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Rahul Bhansali Dec. 20, 2021, 1:26 p.m. UTC
Updates nix_dump and npa_dump to use plt_dump function.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
 drivers/common/cnxk/roc_nix_debug.c | 4 ++--
 drivers/common/cnxk/roc_npa_debug.c | 2 +-
 drivers/common/cnxk/roc_platform.h  | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

Comments

Jerin Jacob Jan. 23, 2022, 1:18 p.m. UTC | #1
On Mon, Dec 20, 2021 at 6:56 PM Rahul Bhansali <rbhansali@marvell.com> wrote:
>
> Updates nix_dump and npa_dump to use plt_dump function.
>
> Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
> ---
>  drivers/common/cnxk/roc_nix_debug.c | 4 ++--
>  drivers/common/cnxk/roc_npa_debug.c | 2 +-
>  drivers/common/cnxk/roc_platform.h  | 1 +
>  3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_nix_debug.c b/drivers/common/cnxk/roc_nix_debug.c
> index 266935a6c5..7466f782c3 100644
> --- a/drivers/common/cnxk/roc_nix_debug.c
> +++ b/drivers/common/cnxk/roc_nix_debug.c
> @@ -5,14 +5,14 @@
>  #include "roc_api.h"
>  #include "roc_priv.h"
>
> -#define nix_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
> +#define nix_dump plt_dump
>  #define NIX_REG_INFO(reg)                                                      \
>         {                                                                      \
>                 reg, #reg                                                      \
>         }
>  #define NIX_REG_NAME_SZ 48
>
> -#define nix_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
> +#define nix_dump_no_nl plt_dump_no_nl
>
>  struct nix_lf_reg_info {
>         uint32_t offset;
> diff --git a/drivers/common/cnxk/roc_npa_debug.c b/drivers/common/cnxk/roc_npa_debug.c
> index 421c2af8a5..798ace291c 100644
> --- a/drivers/common/cnxk/roc_npa_debug.c
> +++ b/drivers/common/cnxk/roc_npa_debug.c
> @@ -5,7 +5,7 @@
>  #include "roc_api.h"
>  #include "roc_priv.h"
>
> -#define npa_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
> +#define npa_dump plt_dump
>
>  static inline void
>  npa_pool_dump(__io struct npa_pool_s *pool)
> diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
> index 61d4781209..13b23cec03 100644
> --- a/drivers/common/cnxk/roc_platform.h
> +++ b/drivers/common/cnxk/roc_platform.h
> @@ -204,6 +204,7 @@ extern int cnxk_logtype_tm;
>  #define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args)
>  #define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
>  #define plt_dump(fmt, ...)      fprintf(stderr, fmt "\n", ##__VA_ARGS__)
> +#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
>
>  /**
>   * Log debug message if given subsystem logging is enabled.
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/common/cnxk/roc_nix_debug.c b/drivers/common/cnxk/roc_nix_debug.c
index 266935a6c5..7466f782c3 100644
--- a/drivers/common/cnxk/roc_nix_debug.c
+++ b/drivers/common/cnxk/roc_nix_debug.c
@@ -5,14 +5,14 @@ 
 #include "roc_api.h"
 #include "roc_priv.h"
 
-#define nix_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
+#define nix_dump plt_dump
 #define NIX_REG_INFO(reg)                                                      \
 	{                                                                      \
 		reg, #reg                                                      \
 	}
 #define NIX_REG_NAME_SZ 48
 
-#define nix_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
+#define nix_dump_no_nl plt_dump_no_nl
 
 struct nix_lf_reg_info {
 	uint32_t offset;
diff --git a/drivers/common/cnxk/roc_npa_debug.c b/drivers/common/cnxk/roc_npa_debug.c
index 421c2af8a5..798ace291c 100644
--- a/drivers/common/cnxk/roc_npa_debug.c
+++ b/drivers/common/cnxk/roc_npa_debug.c
@@ -5,7 +5,7 @@ 
 #include "roc_api.h"
 #include "roc_priv.h"
 
-#define npa_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
+#define npa_dump plt_dump
 
 static inline void
 npa_pool_dump(__io struct npa_pool_s *pool)
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 61d4781209..13b23cec03 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -204,6 +204,7 @@  extern int cnxk_logtype_tm;
 #define plt_warn(fmt, args...) RTE_LOG(WARNING, PMD, fmt "\n", ##args)
 #define plt_print(fmt, args...) RTE_LOG(INFO, PMD, fmt "\n", ##args)
 #define plt_dump(fmt, ...)      fprintf(stderr, fmt "\n", ##__VA_ARGS__)
+#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
 
 /**
  * Log debug message if given subsystem logging is enabled.