xref: /dpdk/drivers/common/sfc_efx/sfc_efx_debug.h (revision 672386c1e9e1f64f7aa3b1360ad22dc737ea8d72)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright(c) 2019-2021 Xilinx, Inc.
4  * Copyright(c) 2019 Solarflare Communications Inc.
5  *
6  * This software was jointly developed between OKTET Labs (under contract
7  * for Solarflare) and Solarflare Communications, Inc.
8  */
9 
10 #ifndef _SFC_EFX_DEBUG_H_
11 #define _SFC_EFX_DEBUG_H_
12 
13 #include <rte_debug.h>
14 
15 #ifndef RTE_DEBUG_COMMON_SFC_EFX
16 #define RTE_DEBUG_COMMON_SFC_EFX	0
17 #endif
18 
19 #ifdef RTE_DEBUG_COMMON_SFC_EFX
20 /* Avoid dependency from RTE_LOG_DP_LEVEL to be able to enable debug check
21  * in the driver only.
22  */
23 #define SFC_EFX_ASSERT(exp)		RTE_VERIFY(exp)
24 #else
25 /* If the driver debug is not enabled, follow DPDK debug/non-debug */
26 #define SFC_EFX_ASSERT(exp)		RTE_ASSERT(exp)
27 #endif
28 
29 #endif /* _SFC_EFX_DEBUG_H_ */
30