From 53d3bbbc090d99a36ae0593ccb34246d1ab4bf6e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 20 Jan 2010 13:07:47 -0800 Subject: [PATCH] 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. --- datapath/datapath.c | 4 +--- datapath/datapath.h | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) 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 */ -- 2.30.2