2015-07-20 16:33:18 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
|
|
|
|
*
|
2018-05-23 20:56:56 +00:00
|
|
|
* Copyright (c) 2015-2018 Cavium Inc.
|
2015-07-20 16:33:18 +00:00
|
|
|
* All rights reserved.
|
2018-05-23 20:56:56 +00:00
|
|
|
* www.cavium.com
|
2015-12-11 06:36:38 +00:00
|
|
|
*
|
|
|
|
* See LICENSE.bnx2x_pmd for copyright and licensing details.
|
2015-07-20 16:33:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PMD_LOGS_H_
|
|
|
|
#define _PMD_LOGS_H_
|
|
|
|
|
2017-12-19 06:38:31 +00:00
|
|
|
extern int bnx2x_logtype_init;
|
2015-07-20 16:33:18 +00:00
|
|
|
#define PMD_INIT_LOG(level, fmt, args...) \
|
2017-12-19 06:38:31 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
|
|
|
|
"%s(): " fmt "\n", __func__, ##args)
|
2015-07-20 16:33:18 +00:00
|
|
|
|
|
|
|
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) \
|
|
|
|
RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
|
|
|
|
#else
|
|
|
|
#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) \
|
|
|
|
RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
|
|
|
|
#else
|
|
|
|
#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE
|
|
|
|
#define PMD_TX_FREE_LOG(level, fmt, args...) \
|
|
|
|
RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
|
|
|
|
#else
|
|
|
|
#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
2017-12-19 06:38:31 +00:00
|
|
|
extern int bnx2x_logtype_driver;
|
2015-07-20 16:33:18 +00:00
|
|
|
#define PMD_DRV_LOG_RAW(level, fmt, args...) \
|
2017-12-19 06:38:31 +00:00
|
|
|
rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
|
|
|
|
"%s(): " fmt, __func__, ## args)
|
2015-07-20 16:33:18 +00:00
|
|
|
|
|
|
|
#define PMD_DRV_LOG(level, fmt, args...) \
|
|
|
|
PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
|
|
|
|
|
2015-12-11 06:36:36 +00:00
|
|
|
#ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
|
|
|
|
#define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) \
|
|
|
|
RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
|
|
|
|
#else
|
|
|
|
#define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) do { } while(0)
|
|
|
|
#endif
|
|
|
|
|
2015-07-20 16:33:18 +00:00
|
|
|
#endif /* _PMD_LOGS_H_ */
|