summaryrefslogtreecommitdiff
path: root/include/openvswitch/types.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-08-04 11:11:40 -0700
committerBen Pfaff <blp@nicira.com>2014-08-04 11:11:40 -0700
commit837eefc76b3c79bb790a4c4c2d0a314d81b71a28 (patch)
treea1f69472e0cf641513506ac54eae1815e0ff0aa5 /include/openvswitch/types.h
parentfa6395df71913c749f104978a736f238fb20bc08 (diff)
downloadopenvswitch-837eefc76b3c79bb790a4c4c2d0a314d81b71a28.tar.gz
Do not seemingly #include Linux-specific headers on other platforms.
Until now, the OVS source tree has had a whole maze of header files that make "#include <linux/openvswitch.h>" work OK regardless of platform, but this confuses everyone new to the tree, at first glance, and is difficult to understand at second glance too. This commit renames include/linux/openvswitch.h to datapath/linux/compat/include/linux/openvswitch.h without other change, then modifies the userspace build to generate a header that makes sense in portable Open vSwitch userspace from that header. It then removes all the remaining include/linux/* files since they are now unused. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'include/openvswitch/types.h')
-rw-r--r--include/openvswitch/types.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h
index d9a5dc883..54541a42b 100644
--- a/include/openvswitch/types.h
+++ b/include/openvswitch/types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, 2013 Nicira, Inc.
+ * Copyright (c) 2010, 2011, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
#ifndef OPENVSWITCH_TYPES_H
#define OPENVSWITCH_TYPES_H 1
-#include <linux/types.h>
#include <sys/types.h>
#include <stdint.h>
@@ -30,14 +29,10 @@
#endif
/* The ovs_be<N> types indicate that an object is in big-endian, not
- * native-endian, byte order. They are otherwise equivalent to uint<N>_t.
- *
- * We bootstrap these from the Linux __be<N> types. If we instead define our
- * own independently then __be<N> and ovs_be<N> become mutually
- * incompatible. */
-typedef __be16 ovs_be16;
-typedef __be32 ovs_be32;
-typedef __be64 ovs_be64;
+ * native-endian, byte order. They are otherwise equivalent to uint<N>_t. */
+typedef uint16_t OVS_BITWISE ovs_be16;
+typedef uint32_t OVS_BITWISE ovs_be32;
+typedef uint64_t OVS_BITWISE ovs_be64;
#define OVS_BE16_MAX ((OVS_FORCE ovs_be16) 0xffff)
#define OVS_BE32_MAX ((OVS_FORCE ovs_be32) 0xffffffff)