]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netdevice.h
Pull acpi_device_handle_cleanup into release branch
[linux-2.6-omap-h63xx.git] / include / linux / netdevice.h
index 84b0f0d16fcbd0166b92c7088a7d7c135ea82ed7..85f99f60deea46c3f5af0f24f9c3a806b51dfd7c 100644 (file)
@@ -313,9 +313,12 @@ struct net_device
 
        /* Segmentation offload features */
 #define NETIF_F_GSO_SHIFT      16
+#define NETIF_F_GSO_MASK       0xffff0000
 #define NETIF_F_TSO            (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
-#define NETIF_F_UFO            (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
+#define NETIF_F_UFO            (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
 #define NETIF_F_GSO_ROBUST     (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
+#define NETIF_F_TSO_ECN                (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
+#define NETIF_F_TSO6           (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
 
 #define NETIF_F_GEN_CSUM       (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
 #define NETIF_F_ALL_CSUM       (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -990,16 +993,21 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
 
 extern void linkwatch_run_queue(void);
 
+static inline int net_gso_ok(int features, int gso_type)
+{
+       int feature = gso_type << NETIF_F_GSO_SHIFT;
+       return (features & feature) == feature;
+}
+
 static inline int skb_gso_ok(struct sk_buff *skb, int features)
 {
-       int feature = skb_shinfo(skb)->gso_size ?
-                     skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
-       return (features & feature) != feature;
+       return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
+                                   skb_shinfo(skb)->gso_type : 0);
 }
 
 static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
 {
-       return skb_gso_ok(skb, dev->features);
+       return !skb_gso_ok(skb, dev->features);
 }
 
 #endif /* __KERNEL__ */