tunnel: Support matching on the presence of Geneve options.
authorJesse Gross <jesse@nicira.com>
Wed, 12 Aug 2015 01:41:37 +0000 (18:41 -0700)
committerJesse Gross <jesse@nicira.com>
Sat, 29 Aug 2015 01:02:00 +0000 (18:02 -0700)
commit1cb20095c3c933aca1e7607ad2dd6ed9933b359e
tree12914dd8463ee6f6b3a702eb9f8e50c302a5619a
parent14dd55a3e3496057e7a7e0281a782b180714348d
tunnel: Support matching on the presence of Geneve options.

Sometimes it is useful to match only on whether a Geneve option
is present even if the specific value is unimportant. A special
case of this is zero length options where there is no value at all
and the only information conveyed is whether the option was included
in the packet.

This operation was partially supported before but it was not consistent -
in particular, options were never serialized through NXM/OXM unless
they had a non-zero mask. Furthermore, zero length options were rejected
altogether when they were installed through the Geneve map OpenFlow
command.

This adds support for these types of matches by making any NXM/OXM for
tunnel metadata force a match on that field. In the case of a zero length
option, both the value and mask of the NXM are ignored.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
14 files changed:
lib/bitmap.h
lib/meta-flow.c
lib/meta-flow.h
lib/nx-match.c
lib/nx-match.h
lib/odp-util.c
lib/ofp-parse.c
lib/ofp-util.c
lib/tun-metadata.c
lib/tun-metadata.h
ofproto/ofproto-dpif-xlate.c
tests/ovs-ofctl.at
tests/tunnel.at
utilities/ovs-ofctl.8.in