projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b69563
)
datapath: Compatibility code for inet_proto_csum_replace2.
author
Jesse Gross
<jesse@nicira.com>
Tue, 7 Dec 2010 03:02:14 +0000
(19:02 -0800)
committer
Jesse Gross
<jesse@nicira.com>
Fri, 10 Dec 2010 01:43:36 +0000
(17:43 -0800)
Kernels earlier than 2.6.25 did not define inet_proto_csum_replace2,
so implement it ourselves.
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/linux-2.6/compat-2.6/include/net/checksum.h
patch
|
blob
|
history
diff --git
a/datapath/linux-2.6/compat-2.6/include/net/checksum.h
b/datapath/linux-2.6/compat-2.6/include/net/checksum.h
index a8c47d855e4b3590b36ba54c9ebe684becc0963a..c2ffb341abd110ae72f2f715558f3bff3d67f7d5 100644
(file)
--- a/
datapath/linux-2.6/compat-2.6/include/net/checksum.h
+++ b/
datapath/linux-2.6/compat-2.6/include/net/checksum.h
@@
-25,6
+25,10
@@
static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to)
sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
}
+
+#define inet_proto_csum_replace2(sum, skb, from, to, pseudohdr) \
+ inet_proto_csum_replace4(sum, skb, (__force __be32)(from), \
+ (__force __be32)(to), pseudohdr)
#endif
#endif /* checksum.h */