vserver 1.9.3
[linux-2.6.git] / include / linux / netdevice.h
index 6a821e7..8325475 100644 (file)
@@ -73,6 +73,11 @@ struct ethtool_ops;
 
 #define MAX_ADDR_LEN   32              /* Largest hardware address length */
 
+/* Driver transmit return codes */
+#define NETDEV_TX_OK 0         /* driver took care of packet */
+#define NETDEV_TX_BUSY 1       /* driver tx path was busy*/
+#define NETDEV_TX_LOCKED -1    /* driver tx lock was already taken */
+
 /*
  *     Compute the worst case header length according to the protocols
  *     used.
@@ -215,6 +220,8 @@ struct hh_cache
  */
 #define LL_RESERVED_SPACE(dev) \
        (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
+#define LL_RESERVED_SPACE_EXTRA(dev,extra) \
+       ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
 
 /* These flag bits are private to the generic network queueing
  * layer, they may not be explicitly referenced by any other
@@ -360,10 +367,12 @@ struct net_device
 
        struct Qdisc            *qdisc;
        struct Qdisc            *qdisc_sleeping;
-       struct Qdisc            *qdisc_list;
        struct Qdisc            *qdisc_ingress;
+       struct list_head        qdisc_list;
        unsigned long           tx_queue_len;   /* Max frames per queue allowed */
 
+       /* ingress path synchronizer */
+       spinlock_t              ingress_lock;
        /* hard_start_xmit synchronizer */
        spinlock_t              xmit_lock;
        /* cpu id of processor entered to hard_start_xmit or -1,
@@ -403,6 +412,7 @@ struct net_device
 #define NETIF_F_HW_VLAN_FILTER 512     /* Receive filtering on VLAN */
 #define NETIF_F_VLAN_CHALLENGED        1024    /* Device cannot handle VLAN packets */
 #define NETIF_F_TSO            2048    /* Can offload TCP/IP segmentation */
+#define NETIF_F_LLTX           4096    /* LockLess TX */
 
        /* Called after device is detached from network. */
        void                    (*uninit)(struct net_device *dev);
@@ -457,7 +467,7 @@ struct net_device
                                                     unsigned char *haddr);
        int                     (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
        int                     (*accept_fastpath)(struct net_device *, struct dst_entry*);
-#ifdef CONFIG_NETPOLL_RX
+#ifdef CONFIG_NETPOLL
        int                     netpoll_rx;
 #endif
 #ifdef CONFIG_NET_POLL_CONTROLLER
@@ -467,12 +477,6 @@ struct net_device
        /* bridge stuff */
        struct net_bridge_port  *br_port;
 
-#ifdef CONFIG_NET_FASTROUTE
-#define NETDEV_FASTROUTE_HMASK 0xF
-       /* Semi-private data. Keep it at the end of device struct. */
-       rwlock_t                fastpath_lock;
-       struct dst_entry        *fastpath[NETDEV_FASTROUTE_HMASK+1];
-#endif
 #ifdef CONFIG_NET_DIVERT
        /* this will get initialized at each interface type init routine */
        struct divert_blk       *divert;
@@ -480,7 +484,6 @@ struct net_device
 
        /* class/net/name entry */
        struct class_device     class_dev;
-       struct net_device_stats* (*last_stats)(struct net_device *);
        /* how much padding had been added by alloc_netdev() */
        int padded;
 };
@@ -556,11 +559,11 @@ extern int                dev_restart(struct net_device *dev);
 extern int             netpoll_trap(void);
 #endif
 
-typedef int gifconf_func_t(struct net_device * dev, char * bufptr, int len);
+typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
 extern int             register_gifconf(unsigned int family, gifconf_func_t * gifconf);
 static inline int unregister_gifconf(unsigned int family)
 {
-       return register_gifconf(family, 0);
+       return register_gifconf(family, NULL);
 }
 
 /*
@@ -674,10 +677,11 @@ static inline void dev_kfree_skb_any(struct sk_buff *skb)
 extern int             netif_rx(struct sk_buff *skb);
 #define HAVE_NETIF_RECEIVE_SKB 1
 extern int             netif_receive_skb(struct sk_buff *skb);
-extern int             dev_ioctl(unsigned int cmd, void *);
+extern int             dev_ioctl(unsigned int cmd, void __user *);
 extern int             dev_ethtool(struct ifreq *);
 extern unsigned                dev_get_flags(const struct net_device *);
 extern int             dev_change_flags(struct net_device *, unsigned);
+extern int             dev_change_name(struct net_device *, char *);
 extern int             dev_set_mtu(struct net_device *, int);
 extern void            dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
 
@@ -941,12 +945,7 @@ extern int         weight_p;
 extern unsigned long   netdev_fc_xoff;
 extern atomic_t netdev_dropping;
 extern int             netdev_set_master(struct net_device *dev, struct net_device *master);
-extern struct sk_buff * skb_checksum_help(struct sk_buff *skb);
-#ifdef CONFIG_NET_FASTROUTE
-extern int             netdev_fastroute;
-extern int             netdev_fastroute_obstacles;
-extern void            dev_clear_fastroute(struct net_device *dev);
-#endif
+extern int skb_checksum_help(struct sk_buff **pskb, int inward);
 
 #ifdef CONFIG_SYSCTL
 extern char *net_sysctl_strdup(const char *s);