[ovs-dev] [PATCH 3/3] lib/flow: Use BUILD_MESSAGE() to warn if BUILD_SEQ is not updated

Daniele Di Proietto ddiproietto at vmware.com
Fri Aug 8 01:15:38 UTC 2014


Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
---
 lib/flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/flow.c b/lib/flow.c
index 2e5ca0a..78b132e 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -123,6 +123,9 @@ struct mf_ctx {
 
 #if (FLOW_WC_SEQ != 27)
 #define MINIFLOW_ASSERT(X) ovs_assert(X)
+BUILD_MESSAGE("FLOW_WC_SEQ changed: miniflow_extract() will have runtime "
+               "assertions enabled. Consider updating FLOW_WC_SEQ after "
+               "testing")
 #else
 #define MINIFLOW_ASSERT(X)
 #endif
-- 
2.0.1




More information about the dev mailing list