diff mbox

[ovs-dev,2/9] Move lib/geneve.h to include/openvswitch directory

Message ID 1456184819-56124-3-git-send-email-ben@skyportsystems.com
State Not Applicable
Headers show

Commit Message

ben@skyportsystems.com Feb. 22, 2016, 11:46 p.m. UTC
From: Ben Warren <ben@skyportsystems.com>

Signed-off-by: Ben Warren <ben@skyportsystems.com>
---
 include/openvswitch/automake.mk |  1 +
 include/openvswitch/geneve.h    | 63 +++++++++++++++++++++++++++++++++++++++++
 lib/automake.mk                 |  1 -
 lib/geneve.h                    | 63 -----------------------------------------
 lib/packets.h                   |  2 +-
 lib/tun-metadata.h              |  2 +-
 6 files changed, 66 insertions(+), 66 deletions(-)
 create mode 100644 include/openvswitch/geneve.h
 delete mode 100644 lib/geneve.h
diff mbox

Patch

diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk
index 46416be..9fc5d5b 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/ofp-parse.h \
 	include/openvswitch/thread.h \
diff --git a/include/openvswitch/geneve.h b/include/openvswitch/geneve.h
new file mode 100644
index 0000000..7311985
--- /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 */
diff --git a/lib/automake.mk b/lib/automake.mk
index ea2f898..183dcdb 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -84,7 +84,6 @@  lib_libopenvswitch_la_SOURCES = \
 	lib/fatal-signal.h \
 	lib/flow.c \
 	lib/flow.h \
-	lib/geneve.h \
 	lib/guarded-list.c \
 	lib/guarded-list.h \
 	lib/hash.c \
diff --git a/lib/geneve.h b/lib/geneve.h
deleted file mode 100644
index db84129..0000000
--- a/lib/geneve.h
+++ /dev/null
@@ -1,63 +0,0 @@ 
-/*
- * 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 */
diff --git a/lib/packets.h b/lib/packets.h
index f1445de..916ad51 100644
--- a/lib/packets.h
+++ b/lib/packets.h
@@ -23,7 +23,7 @@ 
 #include <stdint.h>
 #include <string.h>
 #include "compiler.h"
-#include "geneve.h"
+#include "openvswitch/geneve.h"
 #include "openvswitch/types.h"
 #include "odp-netlink.h"
 #include "random.h"
diff --git a/lib/tun-metadata.h b/lib/tun-metadata.h
index 4b0993e..14471de 100644
--- a/lib/tun-metadata.h
+++ b/lib/tun-metadata.h
@@ -20,10 +20,10 @@ 
 #include <stdint.h>
 
 #include "dynamic-string.h"
-#include "geneve.h"
 #include "netlink.h"
 #include "ofpbuf.h"
 #include "openflow/openflow.h"
+#include "openvswitch/geneve.h"
 
 struct flow_tnl;
 struct match;