aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2011-01-09 01:23:32 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-10 02:35:34 -0500
commitfc741216db156994c554ac31c1151fe0e00d8f0e (patch)
tree692c6278f1c20e4452620adee1ea3cd05d878819 /include/linux/netdevice.h
parentf01a5236bd4b140198fbcc550f085e8361fd73fa (diff)
net offloading: Pass features into netif_needs_gso().
Now that there is a single function that can compute the device features relevant to a packet, we don't want to run it for each offload. This converts netif_needs_gso() to take the features of the device, rather than computing them itself. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d4dac09a5ad2..de2bfe6da359 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2317,16 +2317,10 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features)
2317 (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); 2317 (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST));
2318} 2318}
2319 2319
2320static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 2320static inline int netif_needs_gso(struct sk_buff *skb, int features)
2321{ 2321{
2322 if (skb_is_gso(skb)) { 2322 return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
2323 int features = netif_skb_features(skb); 2323 unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
2324
2325 return (!skb_gso_ok(skb, features) ||
2326 unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
2327 }
2328
2329 return 0;
2330} 2324}
2331 2325
2332static inline void netif_set_gso_max_size(struct net_device *dev, 2326static inline void netif_set_gso_max_size(struct net_device *dev,