2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
4 * Copyright (c) 2015 QLogic Corporation.
8 * See LICENSE.bnx2x_pmd for copyright and licensing details.
14 #define PMD_INIT_LOG(level, sc, fmt, args...) \
16 "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args)
18 #ifdef RTE_LIBRTE_BNX2X_DEBUG_INIT
19 #define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>")
21 #define PMD_INIT_FUNC_TRACE(sc) do { (void)sc; } while(0)
24 #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
25 #define PMD_RX_LOG(level, fmt, args...) \
26 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
28 #define PMD_RX_LOG(level, fmt, args...) do { } while(0)
31 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
32 #define PMD_TX_LOG(level, fmt, args...) \
33 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
35 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
38 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE
39 #define PMD_TX_FREE_LOG(level, fmt, args...) \
40 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
42 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
45 #ifdef RTE_LIBRTE_BNX2X_DEBUG
46 #define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \
47 RTE_LOG(level, PMD, "[%s:%d(%s)] " fmt, __func__, __LINE__, \
48 (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
50 #define PMD_DRV_LOG_RAW(level, sc, fmt, args...) do { } while (0)
53 #define PMD_DRV_LOG(level, sc, fmt, args...) \
54 PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
56 #ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
57 #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \
58 RTE_LOG(level, PMD, "%s(%s): " fmt "\n", __func__, \
59 (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
61 #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) do { } while (0)
65 #endif /* _PMD_LOGS_H_ */