1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016-2018 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 *_sa = (sa); \
30 rte_panic("sfc " PCI_PRI_FMT " #%" PRIu8 ": " fmt "\n", \
31 _sa->pci_addr.domain, _sa->pci_addr.bus, \
32 _sa->pci_addr.devid, _sa->pci_addr.function, \
33 _sa->port_id, ##args); \
36 #endif /* _SFC_DEBUG_H_ */