1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
3 * Copyright (c) 2015-2018 Cavium Inc.
11 extern int bnx2x_logtype_init;
12 #define PMD_INIT_LOG(level, sc, fmt, args...) \
14 "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args)
16 #define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>")
18 #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
19 #define PMD_RX_LOG(level, fmt, args...) \
20 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
22 #define PMD_RX_LOG(level, fmt, args...) do { } while(0)
25 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
26 #define PMD_TX_LOG(level, fmt, args...) \
27 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
29 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
32 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE
33 #define PMD_TX_FREE_LOG(level, fmt, args...) \
34 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
36 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
39 extern int bnx2x_logtype_driver;
40 #define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \
41 RTE_LOG(level, PMD, "[%s:%d(%s)] " fmt, __func__, __LINE__, \
42 (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
44 #define PMD_DRV_LOG(level, sc, fmt, args...) \
45 PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
47 #ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
48 #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \
49 RTE_LOG(level, PMD, "%s(%s): " fmt "\n", __func__, \
50 (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
52 #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) do { } while (0)
55 #endif /* _PMD_LOGS_H_ */