From: Justin Pettit Date: Fri, 12 Jun 2009 22:39:59 +0000 (-0700) Subject: xenserver: xen 2.6.27 kernel doesn't need skb_checksum_setup defined X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ebfbeaf19fdf376897b68f6684fda93d3a1656;p=openvswitch xenserver: xen 2.6.27 kernel doesn't need skb_checksum_setup defined The latest XenServer release is based on 2.6.27. The datapath code defined "skb_checksum_setup", since it wasn't exported in their 2.6.18 kernels. This change causes it only to be built if the kernel is version 2.6.18. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 015edc4b..f519809d 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -574,6 +574,7 @@ static int dp_frame_hook(struct net_bridge_port *p, struct sk_buff **pskb) #endif #ifdef CONFIG_XEN +#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,18) /* This code is copied verbatim from net/dev/core.c in Xen's * linux-2.6.18-92.1.10.el5.xs5.0.0.394.644. We can't call those functions * directly because they aren't exported. */ @@ -620,7 +621,8 @@ int skb_checksum_setup(struct sk_buff *skb) out: return -EPROTO; } -#endif +#endif /* linux == 2.6.18 */ +#endif /* CONFIG_XEN */ int dp_output_control(struct datapath *dp, struct sk_buff *skb, int queue_no,