1 /* SPDX-License-Identifier: BSD-3-Clause 2 * 3 * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. 4 * Copyright NXP 2017. 5 * 6 */ 7 8 #ifndef _DPAA_SEC_LOG_H_ 9 #define _DPAA_SEC_LOG_H_ 10 11 #define PMD_INIT_LOG(level, fmt, args...) \ 12 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) 13 14 #ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_INIT 15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") 16 #else 17 #define PMD_INIT_FUNC_TRACE() do { } while (0) 18 #endif 19 20 #ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_RX 21 #define PMD_RX_LOG(level, fmt, args...) \ 22 RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) 23 #else 24 #define PMD_RX_LOG(level, fmt, args...) do { } while (0) 25 #endif 26 27 #ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_TX 28 #define PMD_TX_LOG(level, fmt, args...) \ 29 RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) 30 #else 31 #define PMD_TX_LOG(level, fmt, args...) do { } while (0) 32 #endif 33 34 #ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER 35 #define PMD_DRV_LOG_RAW(level, fmt, args...) \ 36 RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) 37 #else 38 #define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) 39 #endif 40 41 #define PMD_DRV_LOG(level, fmt, args...) \ 42 PMD_DRV_LOG_RAW(level, fmt "\n", ## args) 43 44 #endif /* _DPAA_SEC_LOG_H_ */ 45