> -----Original Message-----
> From: Anoob Joseph [mailto:anoob.jos...@caviumnetworks.com]
> Sent: Friday, June 8, 2018 5:45 PM
> To: Akhil Goyal <akhil.go...@nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.gua...@intel.com>; Thomas Monjalon <tho...@monjalon.net>
> Cc: Srisivasubramanian Srinivasan
> <srisivasubramanian.sriniva...@cavium.com>; Ankur Dwivedi
> <ankur.dwiv...@cavium.com>; Jerin Jacob
> <jerin.ja...@caviumnetworks.com>; Murthy NSSR
> <nidadavolu.mur...@cavium.com>; Narayana Prasad
> <narayanaprasad.athr...@caviumnetworks.com>; Nithin Dabilpuram
> <nithin.dabilpu...@cavium.com>; Ragothaman Jayaraman
> <ragothaman.jayara...@cavium.com>; dev@dpdk.org
> Subject: [PATCH 10/16] crypto/cpt: add driver initializations
> 
> From: Srisivasubramanian Srinivasan
> <srisivasubramanian.sriniva...@cavium.com>
> 
> Introduce driver initialization and enable build infrastructure.
> 
> Signed-off-by: Ankur Dwivedi <ankur.dwiv...@cavium.com>
> Signed-off-by: Murthy NSSR <nidadavolu.mur...@cavium.com>
> Signed-off-by: Nithin Dabilpuram <nithin.dabilpu...@cavium.com>
> Signed-off-by: Ragothaman Jayaraman
> <ragothaman.jayara...@cavium.com>
> Signed-off-by: Srisivasubramanian Srinivasan
> <srisivasubramanian.sriniva...@cavium.com>
> ---
>  drivers/crypto/cpt/Makefile            |   9 +-
>  drivers/crypto/cpt/cpt_pmd_cryptodev.c | 270
> +++++++++++++++++++++++++++++++++
>  drivers/crypto/cpt/cpt_pmd_logs.h      |  50 ++++++
>  3 files changed, 328 insertions(+), 1 deletion(-)  create mode 100644
> drivers/crypto/cpt/cpt_pmd_cryptodev.c
>  create mode 100644 drivers/crypto/cpt/cpt_pmd_logs.h
> 

...


> +++ b/drivers/crypto/cpt/cpt_pmd_logs.h
> @@ -0,0 +1,50 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017 Cavium, Inc
> + */
> +
> +#ifndef _CPT_PMD_LOGS_H_
> +#define _CPT_PMD_LOGS_H_
> +
> +#include <rte_log.h>
> +
> +#define PMD_DRV_LOG_RAW(level, fmt, args...) \
> +             rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
> +                     "PMD: %s(): " fmt "\n", __func__, ##args)
> +
> +#ifdef RTE_LIBRTE_PMD_CPT_DEBUG_INIT
> +
> +#define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG_RAW(DEBUG, " >>")
> #define
> +PMD_DRV_LOG(level, args...) \
> +     PMD_DRV_LOG_RAW(level, ##args)
> +#else
> +
> +#define PMD_DRV_LOG(...)  do { } while (0) #define
> +PMD_INIT_FUNC_TRACE() do { } while (0) #endif
> +
> +#ifdef RTE_LIBRTE_PMD_CPT_DEBUG_RX
> +
> +#define CPT_DEBUG
> +#define CPTVF_STRICT_PARAM_CHECK
> +#define PMD_RX_LOG(level, args...) \
> +     PMD_DRV_LOG_RAW(level, ##args)
> +#else
> +
> +#define PMD_RX_LOG(...)  do { } while (0) #endif
> +
> +#ifdef RTE_LIBRTE_PMD_CPT_DEBUG_TX
> +
> +#define CPT_DEBUG
> +#define CPTVF_STRICT_PARAM_CHECK
> +
> +#define PMD_TX_LOG(level, args...) \
> +     PMD_DRV_LOG_RAW(level, ##args)
> +#else
> +
> +#define PMD_TX_LOG(...)  do { } while (0) #endif
> +
> +#define PRINT printf
> +
> +#endif
> --
> 1.9.3

As already said in another commit, use dynamic logging
and try to remove the compilation flags.

Thanks,
Pablo

Reply via email to