net/sfc: avoid Rx queue setup failure if thresholds are set
[dpdk.git] / drivers / net / sfc / sfc_debug.h
index f18ac7d..92eba9c 100644 (file)
@@ -1,5 +1,7 @@
 /*-
- * Copyright (c) 2016 Solarflare Communications Inc.
+ *   BSD LICENSE
+ *
+ * Copyright (c) 2016-2017 Solarflare Communications Inc.
  * All rights reserved.
  *
  * This software was jointly developed between OKTET Labs (under contract
 #define SFC_ASSERT(exp)                        RTE_ASSERT(exp)
 #endif
 
+/* Log PMD message, automatically add prefix and \n */
+#define sfc_panic(sa, fmt, args...) \
+       do {                                                            \
+               const struct sfc_adapter *_sa = (sa);                   \
+                                                                       \
+               rte_panic("sfc " PCI_PRI_FMT " #%" PRIu8 ": " fmt "\n", \
+                         _sa->pci_addr.domain, _sa->pci_addr.bus,      \
+                         _sa->pci_addr.devid, _sa->pci_addr.function,  \
+                         _sa->port_id, ##args);                        \
+       } while (0)
+
 #endif /* _SFC_DEBUG_H_ */