spi: documentation: emphasise spi_master.setup() semantics
[safe/jmp/linux-2.6] / include / linux / netdevice.h
index 355662a..2e7783f 100644 (file)
@@ -32,6 +32,7 @@
 #ifdef __KERNEL__
 #include <linux/timer.h>
 #include <linux/delay.h>
+#include <linux/mm.h>
 #include <asm/atomic.h>
 #include <asm/cache.h>
 #include <asm/byteorder.h>
@@ -330,6 +331,14 @@ enum
        NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
 };
 
+enum {
+       GRO_MERGED,
+       GRO_MERGED_FREE,
+       GRO_HELD,
+       GRO_NORMAL,
+       GRO_DROP,
+};
+
 extern void __napi_schedule(struct napi_struct *n);
 
 static inline int napi_disable_pending(struct napi_struct *n)
@@ -585,6 +594,14 @@ struct net_device_ops {
 #define HAVE_NETDEV_POLL
        void                    (*ndo_poll_controller)(struct net_device *dev);
 #endif
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
+       int                     (*ndo_fcoe_ddp_setup)(struct net_device *dev,
+                                                     u16 xid,
+                                                     struct scatterlist *sgl,
+                                                     unsigned int sgc);
+       int                     (*ndo_fcoe_ddp_done)(struct net_device *dev,
+                                                    u16 xid);
+#endif
 };
 
 /*
@@ -653,14 +670,17 @@ struct net_device
 #define NETIF_F_GRO            16384   /* Generic receive offload */
 #define NETIF_F_LRO            32768   /* large receive offload */
 
+#define NETIF_F_FCOE_CRC       (1 << 24) /* FCoE CRC32 */
+
        /* Segmentation offload features */
 #define NETIF_F_GSO_SHIFT      16
-#define NETIF_F_GSO_MASK       0xffff0000
+#define NETIF_F_GSO_MASK       0x00ff0000
 #define NETIF_F_TSO            (SKB_GSO_TCPV4 << 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_FSO            (SKB_GSO_FCOE << NETIF_F_GSO_SHIFT)
 
        /* List of features with software fallbacks. */
 #define NETIF_F_GSO_SOFTWARE   (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
@@ -843,6 +863,11 @@ struct net_device
        struct dcbnl_rtnl_ops *dcbnl_ops;
 #endif
 
+#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
+       /* max exchange id for FCoE LRO by ddp */
+       unsigned int            fcoe_ddp_xid;
+#endif
+
 #ifdef CONFIG_COMPAT_NET_DEV_OPS
        struct {
                int                     (*init)(struct net_device *dev);
@@ -1085,6 +1110,7 @@ extern void               synchronize_net(void);
 extern int             register_netdevice_notifier(struct notifier_block *nb);
 extern int             unregister_netdevice_notifier(struct notifier_block *nb);
 extern int             init_dummy_netdev(struct net_device *dev);
+extern void            netdev_resync_ops(struct net_device *dev);
 
 extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
 extern struct net_device       *dev_get_by_index(struct net *net, int ifindex);
@@ -1863,7 +1889,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
 
                if (dev->priv_flags & IFF_SLAVE_INACTIVE) {
                        if ((dev->priv_flags & IFF_SLAVE_NEEDARP) &&
-                           skb->protocol == __constant_htons(ETH_P_ARP))
+                           skb->protocol == __cpu_to_be16(ETH_P_ARP))
                                return 0;
 
                        if (master->priv_flags & IFF_MASTER_ALB) {
@@ -1872,7 +1898,7 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
                                        return 0;
                        }
                        if (master->priv_flags & IFF_MASTER_8023AD &&
-                           skb->protocol == __constant_htons(ETH_P_SLOW))
+                           skb->protocol == __cpu_to_be16(ETH_P_SLOW))
                                return 0;
 
                        return 1;