[ovs-dev] [PATCH] datapath: Move CSUM_MANGLED_0 definition to net checksum header.
Pravin B Shelar
pshelar at nicira.com
Wed Mar 21 23:33:52 UTC 2012
Following patch fixes compilation error on older kernel.
Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
datapath/linux/Modules.mk | 1 -
datapath/linux/compat/include/linux/checksum.h | 10 ----------
datapath/linux/compat/include/net/checksum.h | 4 ++++
3 files changed, 4 insertions(+), 11 deletions(-)
delete mode 100644 datapath/linux/compat/include/linux/checksum.h
diff --git a/datapath/linux/Modules.mk b/datapath/linux/Modules.mk
index baa4196..819247b 100644
--- a/datapath/linux/Modules.mk
+++ b/datapath/linux/Modules.mk
@@ -13,7 +13,6 @@ openvswitch_sources += \
linux/compat/time.c \
linux/compat/workqueue.c
openvswitch_headers += \
- linux/compat/include/linux/checksum.h \
linux/compat/include/linux/compiler.h \
linux/compat/include/linux/compiler-gcc.h \
linux/compat/include/linux/cpumask.h \
diff --git a/datapath/linux/compat/include/linux/checksum.h b/datapath/linux/compat/include/linux/checksum.h
deleted file mode 100644
index 1d4fefc..0000000
--- a/datapath/linux/compat/include/linux/checksum.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __LINUX_CHECKSUM_WRAPPER_H
-#define __LINUX_CHECKSUM_WRAPPER_H 1
-
-#include_next <linux/checksum.h>
-
-#ifndef CSUM_MANGLED_0
-#define CSUM_MANGLED_0 ((__force __sum16)0xffff)
-#endif
-
-#endif
diff --git a/datapath/linux/compat/include/net/checksum.h b/datapath/linux/compat/include/net/checksum.h
index ee64f24..502d02d 100644
--- a/datapath/linux/compat/include/net/checksum.h
+++ b/datapath/linux/compat/include/net/checksum.h
@@ -38,4 +38,8 @@ static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to)
(__force __be32)(to), pseudohdr)
#endif
+#ifndef CSUM_MANGLED_0
+#define CSUM_MANGLED_0 ((__force __sum16)0xffff)
+#endif
+
#endif /* checksum.h */
--
1.7.1
More information about the dev
mailing list