1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2014, 2015 Netronome Systems, Inc.
11 extern int nfp_logtype_init;
12 #define PMD_INIT_LOG(level, fmt, args...) \
13 rte_log(RTE_LOG_ ## level, nfp_logtype_init, \
14 "%s(): " fmt "\n", __func__, ## args)
15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
17 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_RX
18 #define PMD_RX_LOG(level, fmt, args...) \
19 RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args)
21 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
24 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_TX
25 #define PMD_TX_LOG(level, fmt, args...) \
26 RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args)
27 #define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
29 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
30 #define ASSERT(x) do { } while (0)
33 #define PMD_CPP_LOG(level, fmt, args...) do { } while (0)
35 extern int nfp_logtype_driver;
36 #define PMD_DRV_LOG(level, fmt, args...) \
37 rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \
38 "%s(): " fmt "\n", __func__, ## args)
40 #endif /* _NFP_LOGS_H_ */