diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-07-29 13:15:09 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-08-12 15:05:41 -0700 |
commit | a877206f2f0ca10c625e311614d68a81bdc913ee (patch) | |
tree | 3d6fb0d279575af45054011cefd5688d826ce0af /lib/nx-match.c | |
parent | 027be501207df3f6c8e480fc013799dae63f748b (diff) |
flow: New FLOW_WC_SEQ build assertion.
Changing "struct flow" or its wildcards requires minor adjustments
in many places in the code. This patch adds a new FLOW_WC_SEQ
sequence number which when incremented will cause build assertion
failures aiding the developer in finding code which needs to
change.
Diffstat (limited to 'lib/nx-match.c')
-rw-r--r-- | lib/nx-match.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c index e698cc62..ecc284e9 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -162,6 +162,8 @@ parse_nxm_entry(struct cls_rule *rule, const struct nxm_field *f, struct flow_wildcards *wc = &rule->wc; struct flow *flow = &rule->flow; + BUILD_ASSERT_DECL(FLOW_WC_SEQ == 1); + switch (f->index) { /* Metadata. */ case NFI_NXM_OF_IN_PORT: @@ -706,6 +708,8 @@ nx_put_match(struct ofpbuf *b, const struct cls_rule *cr) int match_len; int i; + BUILD_ASSERT_DECL(FLOW_WC_SEQ == 1); + /* Metadata. */ if (!(wc & FWW_IN_PORT)) { uint16_t in_port = flow->in_port; |