netdev: Move gso_skb into netdev_queue.
[deliverable/linux.git] / include / linux / netdevice.h
index 9ccbfac3fd95aacee71c79a775c5abf873e4ea3c..aae6c6d153f2e93582f1dfaa45902076f5a9a0a7 100644 (file)
@@ -88,6 +88,8 @@ struct wireless_dev;
 #define NETDEV_TX_BUSY 1       /* driver tx path was busy*/
 #define NETDEV_TX_LOCKED -1    /* driver tx lock was already taken */
 
+#ifdef  __KERNEL__
+
 /*
  *     Compute the worst case header length according to the protocols
  *     used.
@@ -114,6 +116,8 @@ struct wireless_dev;
 #define MAX_HEADER (LL_MAX_HEADER + 48)
 #endif
 
+#endif  /*  __KERNEL__  */
+
 struct net_device_subqueue
 {
        /* Give a control state for each queue.  This struct may contain
@@ -444,6 +448,16 @@ static inline void napi_synchronize(const struct napi_struct *n)
 # define napi_synchronize(n)   barrier()
 #endif
 
+struct netdev_queue {
+       spinlock_t              lock;
+       struct net_device       *dev;
+       struct Qdisc            *qdisc;
+       struct sk_buff          *gso_skb;
+       struct Qdisc            *qdisc_sleeping;
+       struct list_head        qdisc_list;
+       struct netdev_queue     *next_sched;
+};
+
 /*
  *     The DEVICE structure.
  *     Actually, this whole structure is a big mistake.  It mixes I/O
@@ -533,8 +547,6 @@ struct net_device
 #define NETIF_F_V6_CSUM                (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
 #define NETIF_F_ALL_CSUM       (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM)
 
-       struct net_device       *next_sched;
-
        /* Interface index. Unique device identifier    */
        int                     ifindex;
        int                     iflink;
@@ -595,8 +607,8 @@ struct net_device
        int                     uc_promisc;
        struct dev_addr_list    *mc_list;       /* Multicast mac addresses      */
        int                     mc_count;       /* Number of installed mcasts   */
-       int                     promiscuity;
-       int                     allmulti;
+       unsigned int            promiscuity;
+       unsigned int            allmulti;
 
 
        /* Protocol specific pointers */
@@ -620,23 +632,10 @@ struct net_device
 
        unsigned char           broadcast[MAX_ADDR_LEN];        /* hw bcast add */
 
-       /* ingress path synchronizer */
-       spinlock_t              ingress_lock;
-       struct Qdisc            *qdisc_ingress;
-
-/*
- * Cache line mostly used on queue transmit path (qdisc)
- */
-       /* device queue lock */
-       spinlock_t              queue_lock ____cacheline_aligned_in_smp;
-       struct Qdisc            *qdisc;
-       struct Qdisc            *qdisc_sleeping;
-       struct list_head        qdisc_list;
+       struct netdev_queue     rx_queue;
+       struct netdev_queue     tx_queue ____cacheline_aligned_in_smp;
        unsigned long           tx_queue_len;   /* Max frames per queue allowed */
 
-       /* Partially transmitted GSO packet. */
-       struct sk_buff          *gso_skb;
-
 /*
  * One part is mostly used on xmit path (device)
  */
@@ -736,6 +735,8 @@ struct net_device
        struct net_bridge_port  *br_port;
        /* macvlan */
        struct macvlan_port     *macvlan_port;
+       /* GARP */
+       struct garp_port        *garp_port;
 
        /* class/net/name entry */
        struct device           dev;
@@ -886,6 +887,7 @@ extern struct net_device    *__dev_get_by_name(struct net *net, const char *name);
 extern int             dev_alloc_name(struct net_device *dev, const char *name);
 extern int             dev_open(struct net_device *dev);
 extern int             dev_close(struct net_device *dev);
+extern void            dev_disable_lro(struct net_device *dev);
 extern int             dev_queue_xmit(struct sk_buff *skb);
 extern int             register_netdevice(struct net_device *dev);
 extern void            unregister_netdevice(struct net_device *dev);
@@ -935,7 +937,7 @@ static inline int unregister_gifconf(unsigned int family)
  */
 struct softnet_data
 {
-       struct net_device       *output_queue;
+       struct netdev_queue     *output_queue;
        struct sk_buff_head     input_pkt_queue;
        struct list_head        poll_list;
        struct sk_buff          *completion_queue;
@@ -1476,8 +1478,8 @@ extern int                __dev_addr_delete(struct dev_addr_list **list, int *count, void *ad
 extern int             __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly);
 extern int             __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
 extern void            __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
-extern void            dev_set_promiscuity(struct net_device *dev, int inc);
-extern void            dev_set_allmulti(struct net_device *dev, int inc);
+extern int             dev_set_promiscuity(struct net_device *dev, int inc);
+extern int             dev_set_allmulti(struct net_device *dev, int inc);
 extern void            netdev_state_change(struct net_device *dev);
 extern void            netdev_bonding_change(struct net_device *dev);
 extern void            netdev_features_change(struct net_device *dev);
This page took 0.028625 seconds and 5 git commands to generate.