diff options
author | Jesse Gross <jesse@nicira.com> | 2015-06-19 13:39:03 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2015-06-25 11:08:58 -0700 |
commit | 4531547f4a8ae9e5231a021f9345abfe27418584 (patch) | |
tree | 3d30e0fb2f679b946f335c3c0bab61cc190628b0 /lib/meta-flow.c | |
parent | 6159c531d09a19f5eb6865fc5221c04156aa0bf4 (diff) | |
download | openvswitch-4531547f4a8ae9e5231a021f9345abfe27418584.tar.gz |
metaflow: Extend size of mf_value to 128 bytes.
Tunnel metadata can be substantially larger than our existing fields
(up to 124 bytes in a single Geneve option) so this extends the size
of the data that we can handle with metaflow fields. This also
breaks a few tests that assume that their max size is also the
maximum that can be handled in a field.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/meta-flow.c')
-rw-r--r-- | lib/meta-flow.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/meta-flow.c b/lib/meta-flow.c index e544032c4..55b2c6559 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -384,8 +384,9 @@ mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow) void mf_mask_field_and_prereqs(const struct mf_field *mf, struct flow *mask) { - static const union mf_value exact_match_mask = MF_EXACT_MASK_INITIALIZER; + static union mf_value exact_match_mask; + memset(&exact_match_mask, 0xff, sizeof exact_match_mask); mf_set_flow_value(mf, &exact_match_mask, mask); switch (mf->prereqs) { @@ -1000,7 +1001,9 @@ mf_set_value(const struct mf_field *mf, void mf_mask_field(const struct mf_field *mf, struct flow *mask) { - static const union mf_value exact_match_mask = MF_EXACT_MASK_INITIALIZER; + union mf_value exact_match_mask; + + memset(&exact_match_mask, 0xff, sizeof exact_match_mask); /* For MFF_DL_VLAN, we cannot send a all 1's to flow_set_dl_vlan() * as that will be considered as OFP10_VLAN_NONE. So consider it as a |