net/mlx4: workaround verbs error after plug-out
[dpdk.git] / drivers / net / mlx4 / mlx4.h
index a2e0ae7..c0ade4f 100644 (file)
@@ -182,7 +182,13 @@ enum {
                (DEBUG__(__VA_ARGS__), 0)       \
        })[0])
 #define DEBUG(...) DEBUG_(__VA_ARGS__, '\n')
+#ifndef MLX4_PMD_DEBUG_BROKEN_VERBS
 #define claim_zero(...) assert((__VA_ARGS__) == 0)
+#else /* MLX4_PMD_DEBUG_BROKEN_VERBS */
+#define claim_zero(...) \
+       (void)(((__VA_ARGS__) == 0) || \
+               DEBUG("Assertion `(" # __VA_ARGS__ ") == 0' failed (IGNORED)."))
+#endif /* MLX4_PMD_DEBUG_BROKEN_VERBS */
 #define claim_nonzero(...) assert((__VA_ARGS__) != 0)
 #define claim_positive(...) assert((__VA_ARGS__) >= 0)
 #else /* NDEBUG */