From: Ben Pfaff Date: Wed, 20 Jan 2010 21:07:47 +0000 (-0800) Subject: datapath: Clean up vswitch_skb_checksum_setup(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53d3bbbc090d99a36ae0593ccb34246d1ab4bf6e;p=openvswitch datapath: Clean up vswitch_skb_checksum_setup(). 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. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 2a8fb503..12798958 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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. */ diff --git a/datapath/datapath.h b/datapath/datapath.h index 9b4c4386..643c91ac 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -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 */