[ovs-dev] [PATCH 0/3] Update FLOW_WC_SEQ in lib/flow.c and add "warning"
Daniele Di Proietto
ddiproietto at vmware.com
Fri Aug 8 01:15:35 UTC 2014
If FLOW_WC_SEQ is not updated in lib/flow.c miniflow_extract() will run with
assertions enabled. This is done to help testing changes to struct flow during
development, but can hurt performance a lot, since miniflow_extract() is at the
heart of the userspace fast path.
This patch series, beside updating the FLOW_WC_SEQ, introduces a mechanism to
issue a compile-time message (without preventing the build to complete
succesfully) that will prevent this kind of discrepancy in the future.
Another simpler approach would be to use a build-time assertion, but that would
prevent developers from testing of miniflow_extract() with run-time assertions.
Daniele Di Proietto (3):
lib/flow: Update FLOW_WC_SEQ to skip assertions on miniflow_extract()
Add BUILD_MESSAGE() macro
lib/flow: Use BUILD_MESSAGE() to warn if BUILD_SEQ is not updated
configure.ac | 1 +
lib/compiler.h | 10 ++++++++++
lib/flow.c | 7 +++++--
m4/openvswitch.m4 | 9 +++++++++
4 files changed, 25 insertions(+), 2 deletions(-)
More information about the dev