datapath: Clean up vswitch_skb_checksum_setup().
authorBen Pfaff <blp@nicira.com>
Wed, 20 Jan 2010 21:07:47 +0000 (13:07 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 25 Jan 2010 18:24:38 +0000 (10:24 -0800)
vswitch_skb_checksum_setup() can be defined in datapath.h as a no-op
when defined(CONFIG_XEN) && defined(HAVE_PROTO_DATA_VALID) is false.

Also, skb_checksum_setup(), which was defined similarly, can be dropped
now, since it was unused.

datapath/datapath.c
datapath/datapath.h

index 2a8fb50..1279895 100644 (file)
@@ -621,9 +621,7 @@ int vswitch_skb_checksum_setup(struct sk_buff *skb)
 out:
        return -EPROTO;
 }
-#else
-int vswitch_skb_checksum_setup(struct sk_buff *skb) { return 0; }
-#endif /* CONFIG_XEN && linux == 2.6.18 */
+#endif /* CONFIG_XEN && HAVE_PROTO_DATA_VALID */
 
 /* Append each packet in 'skb' list to 'queue'.  There will be only one packet
  * unless we broke up a GSO packet. */
index 9b4c438..643c91a 100644 (file)
@@ -159,15 +159,13 @@ static inline const char *dp_name(const struct datapath *dp)
        return dp->ports[ODPP_LOCAL]->dev->name;
 }
 
-#ifdef CONFIG_XEN
-int skb_checksum_setup(struct sk_buff *skb);
+#if defined(CONFIG_XEN) && defined(HAVE_PROTO_DATA_VALID)
+int vswitch_skb_checksum_setup(struct sk_buff *skb);
 #else
-static inline int skb_checksum_setup(struct sk_buff *skb)
+static inline int vswitch_skb_checksum_setup(struct sk_buff *skb)
 {
        return 0;
 }
 #endif
 
-int vswitch_skb_checksum_setup(struct sk_buff *skb);
-
 #endif /* datapath.h */