summaryrefslogtreecommitdiff
path: root/datapath/linux/compat/include/linux/kernel.h
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2014-04-28 14:25:06 -0700
committerJustin Pettit <jpettit@nicira.com>2014-07-25 12:05:20 -0700
commit816f3bca9f5d23a0cf3b2ec922382f72b7b1b0d6 (patch)
treed0c40aa9be6af9ab84fb2d0b93d8152787806861 /datapath/linux/compat/include/linux/kernel.h
parentdf0e5f55763289e37f90d1f2464423f07478f372 (diff)
downloadopenvswitch-816f3bca9f5d23a0cf3b2ec922382f72b7b1b0d6.tar.gz
Initial check-in of kernel-based elephant flow detection.elephant
Areas to work on: - Doesn't populate "elephant-flows" field. - Doesn't properly handle tunnels. - Doesn't have clean way to query elephant table. - Double-check locking. - Should use names instead of number for mechanism. - When changing detection mechanism, should clear old table. - Breaks unit tests
Diffstat (limited to 'datapath/linux/compat/include/linux/kernel.h')
-rw-r--r--datapath/linux/compat/include/linux/kernel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/datapath/linux/compat/include/linux/kernel.h b/datapath/linux/compat/include/linux/kernel.h
index 5dfe08e91..bbb04f18f 100644
--- a/datapath/linux/compat/include/linux/kernel.h
+++ b/datapath/linux/compat/include/linux/kernel.h
@@ -46,6 +46,12 @@
#endif
+#ifndef U8_MAX
+#define U8_MAX ((u8)(~0U))
+#define S8_MAX ((s8)(U8_MAX>>1))
+#define S8_MIN ((s8)(-S8_MAX - 1))
+#endif
+
#ifndef USHRT_MAX
#define USHRT_MAX ((u16)(~0U))
#define SHRT_MAX ((s16)(USHRT_MAX>>1))