diff options
author | Ben Warren <ben@skyportsystems.com> | 2016-03-03 10:20:42 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-03-19 09:37:48 -0700 |
commit | b211014d26bd467f1e46db3dacefa9249819148c (patch) | |
tree | db54ff645e23e10beabaecd904b8a3f9aab2ed3f /include | |
parent | 27de40d031a1a93412be6aba30d901c27f308604 (diff) | |
download | openvswitch-b211014d26bd467f1e46db3dacefa9249819148c.tar.gz |
Move lib/geneve.h to include/openvswitch directory
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/automake.mk | 1 | ||||
-rw-r--r-- | include/openvswitch/geneve.h | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index 90a45cb00..1e69dd8a7 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -1,6 +1,7 @@ openvswitchincludedir = $(includedir)/openvswitch openvswitchinclude_HEADERS = \ include/openvswitch/compiler.h \ + include/openvswitch/geneve.h \ include/openvswitch/list.h \ include/openvswitch/thread.h \ include/openvswitch/token-bucket.h \ diff --git a/include/openvswitch/geneve.h b/include/openvswitch/geneve.h new file mode 100644 index 000000000..73119857a --- /dev/null +++ b/include/openvswitch/geneve.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015 Nicira, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OPENVSWITCH_GENEVE_H +#define OPENVSWITCH_GENEVE_H 1 + +#include "openvswitch/types.h" + +#define TLV_MAX_OPT_SIZE 124 +#define TLV_TOT_OPT_SIZE 252 + +#define GENEVE_CRIT_OPT_TYPE (1 << 7) + +struct geneve_opt { + ovs_be16 opt_class; + uint8_t type; +#ifdef WORDS_BIGENDIAN + uint8_t r1:1; + uint8_t r2:1; + uint8_t r3:1; + uint8_t length:5; +#else + uint8_t length:5; + uint8_t r3:1; + uint8_t r2:1; + uint8_t r1:1; +#endif + /* Option data */ +}; + +struct genevehdr { +#ifdef WORDS_BIGENDIAN + uint8_t ver:2; + uint8_t opt_len:6; + uint8_t oam:1; + uint8_t critical:1; + uint8_t rsvd1:6; +#else + uint8_t opt_len:6; + uint8_t ver:2; + uint8_t rsvd1:6; + uint8_t critical:1; + uint8_t oam:1; +#endif + ovs_be16 proto_type; + ovs_16aligned_be32 vni; + struct geneve_opt options[]; +}; + +#endif /* geneve.h */ |