[dpdk-dev] [PATCH 10/16] crypto/cpt: add driver initializations

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Jun 19 17:25:41 CEST 2018



> -----Original Message-----
> From: Anoob Joseph [mailto:anoob.joseph at caviumnetworks.com]
> Sent: Friday, June 8, 2018 5:45 PM
> To: Akhil Goyal <akhil.goyal at nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; Thomas Monjalon <thomas at monjalon.net>
> Cc: Srisivasubramanian Srinivasan
> <Srisivasubramanian.Srinivasan at cavium.com>; Ankur Dwivedi
> <ankur.dwivedi at cavium.com>; Jerin Jacob
> <jerin.jacob at caviumnetworks.com>; Murthy NSSR
> <Nidadavolu.Murthy at cavium.com>; Narayana Prasad
> <narayanaprasad.athreya at caviumnetworks.com>; Nithin Dabilpuram
> <nithin.dabilpuram at cavium.com>; Ragothaman Jayaraman
> <Ragothaman.Jayaraman at cavium.com>; dev at dpdk.org
> Subject: [PATCH 10/16] crypto/cpt: add driver initializations
> 
> From: Srisivasubramanian Srinivasan
> <Srisivasubramanian.Srinivasan at cavium.com>
> 
> Introduce driver initialization and enable build infrastructure.
> 
> Signed-off-by: Ankur Dwivedi <ankur.dwivedi at cavium.com>
> Signed-off-by: Murthy NSSR <Nidadavolu.Murthy at cavium.com>
> Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram at cavium.com>
> Signed-off-by: Ragothaman Jayaraman
> <Ragothaman.Jayaraman at cavium.com>
> Signed-off-by: Srisivasubramanian Srinivasan
> <Srisivasubramanian.Srinivasan at 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



More information about the dev mailing list