Re: [PATCH 10/16] crypto/cpt: add driver initializations
From: De Lara Guarch, Pablo <hidden>
Date: 2018-06-19 15:25:46
-----Original Message----- From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] Sent: Friday, June 8, 2018 5:45 PM To: Akhil Goyal <redacted>; De Lara Guarch, Pablo [off-list ref]; Thomas Monjalon [off-list ref] Cc: Srisivasubramanian Srinivasan [off-list ref]; Ankur Dwivedi [off-list ref]; Jerin Jacob [off-list ref]; Murthy NSSR [off-list ref]; Narayana Prasad [off-list ref]; Nithin Dabilpuram [off-list ref]; Ragothaman Jayaraman [off-list ref]; dev@dpdk.org Subject: [PATCH 10/16] crypto/cpt: add driver initializations From: Srisivasubramanian Srinivasan [off-list ref] Introduce driver initialization and enable build infrastructure. Signed-off-by: Ankur Dwivedi <redacted> Signed-off-by: Murthy NSSR <redacted> Signed-off-by: Nithin Dabilpuram <redacted> Signed-off-by: Ragothaman Jayaraman [off-list ref] Signed-off-by: Srisivasubramanian Srinivasan [off-list ref] --- 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
...
quoted hunk ↗ jump to hunk
+++ 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