diff options
author | Jesse Gross <jesse@nicira.com> | 2014-06-05 19:07:32 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2014-06-20 15:19:35 -0700 |
commit | c1fc1411d204c59608bf9fe36a65bd221b10cbb2 (patch) | |
tree | efafb29b0bf6dbc98dd0e8da168ba1fc78b962cb /lib/packets.h | |
parent | 1d2a1b5f5252e4c6ce8bbf8d91ca27aba52496e6 (diff) | |
download | openvswitch-c1fc1411d204c59608bf9fe36a65bd221b10cbb2.tar.gz |
datapath: Add support for Geneve tunneling.
This adds support for Geneve - Generic Network Virtualization
Encapsulation. The protocol is documented at
http://tools.ietf.org/html/draft-gross-geneve-00
The kernel implementation is completely agnostic to the options
that are in use and can handle newly defined options without
further work. It does this by simply matching on a byte array
of options and allowing userspace to setup flows on this array.
Userspace currently implements only support for basic version of
Geneve. It can work with the base header (including the VNI) and
is capable of parsing options but does not currently support any
particular option definitions. Over time, the intention is to
allow options to be matched through OpenFlow without requiring
explicit support in OVS userspace.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'lib/packets.h')
-rw-r--r-- | lib/packets.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/packets.h b/lib/packets.h index 4575dd081..c04e3bb1a 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -674,6 +674,24 @@ static inline bool dl_type_is_ip_any(ovs_be16 dl_type) || dl_type == htons(ETH_TYPE_IPV6); } +#define GENEVE_CRIT_OPT_TYPE (1 << 7) +struct geneve_opt { + ovs_be16 opt_class; + uint8_t type; +#ifdef LITTLE_ENDIAN + uint8_t length:5; + uint8_t r3:1; + uint8_t r2:1; + uint8_t r1:1; +#else + uint8_t r1:1; + uint8_t r2:1; + uint8_t r3:1; + uint8_t length:5; +#endif + uint8_t opt_data[]; +}; + void format_ipv6_addr(char *addr_str, const struct in6_addr *addr); void print_ipv6_addr(struct ds *string, const struct in6_addr *addr); void print_ipv6_masked(struct ds *string, const struct in6_addr *addr, |