1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2019-2021 Xilinx, Inc.
4 * Copyright(c) 2016-2019 Solarflare Communications Inc.
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
13 #include <rte_debug.h>
15 #ifdef RTE_LIBRTE_SFC_EFX_DEBUG
16 /* Avoid dependency from RTE_LOG_DP_LEVEL to be able to enable debug check
19 #define SFC_ASSERT(exp) RTE_VERIFY(exp)
21 /* If the driver debug is not enabled, follow DPDK debug/non-debug */
22 #define SFC_ASSERT(exp) RTE_ASSERT(exp)
25 /* Log PMD message, automatically add prefix and \n */
26 #define sfc_panic(sa, fmt, args...) \
28 const struct sfc_adapter_shared *_sas; \
30 _sas = (sa)->priv.shared; \
31 rte_panic("sfc " PCI_PRI_FMT \
32 " #%" PRIu16 ": " fmt "\n", \
33 _sas->pci_addr.domain, _sas->pci_addr.bus, \
34 _sas->pci_addr.devid, _sas->pci_addr.function,\
35 _sas->port_id, ##args); \
38 #endif /* _SFC_DEBUG_H_ */