2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00
Files
openvswitch/lib/geneve.h
Mengke Liu 4e548ad9e6 geneve-map-rename: rename geneve-map to tlv-map.
This patch renames the command name related with geneve-map to a more
generic name as following:
add-geneve-map -> add-tlv-map
del-geneve-map -> del-tlv-map
dump-geneve-map -> dump-tlv-map

It also renames the Geneve_table to tlv_table.

By doing this renaming, the NSH variable context header (the same TLV
format as Geneve) or other protocol can reuse the field tun_metadata<N>
in the future.

Signed-off-by: Mengke Liu <mengke.liu@intel.com>
Signed-off-by: Ricky Li <ricky.li@intel.com>
Signed-off-by: Jesse Gross <jesse@kernel.org>
2015-12-15 13:06:11 -08:00

64 lines
1.4 KiB
C

/*
* 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 GENEVE_H
#define 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 */