]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/netdevice.h
bfin_mac: fix memleak in mii_bus{probe|remove}
[mirror_ubuntu-artful-kernel.git] / include / linux / netdevice.h
index 3c5ed5f5274e498f46c951731857f656ebf9e196..256419583d9d1e6e7cf17a9f9a06489a9c418af2 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/if_link.h>
 
 #ifdef __KERNEL__
+#include <linux/pm_qos_params.h>
 #include <linux/timer.h>
 #include <linux/delay.h>
 #include <linux/mm.h>
@@ -218,16 +219,6 @@ struct neighbour;
 struct neigh_parms;
 struct sk_buff;
 
-struct netif_rx_stats {
-       unsigned total;
-       unsigned dropped;
-       unsigned time_squeeze;
-       unsigned cpu_collision;
-       unsigned received_rps;
-};
-
-DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
-
 struct netdev_hw_addr {
        struct list_head        list;
        unsigned char           addr[MAX_ADDR_LEN];
@@ -696,6 +687,9 @@ struct netdev_rx_queue {
  * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
  * int (*ndo_get_vf_config)(struct net_device *dev,
  *                         int vf, struct ifla_vf_info *ivf);
+ * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
+ *                       struct nlattr *port[]);
+ * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
  */
 #define HAVE_NET_DEVICE_OPS
 struct net_device_ops {
@@ -734,6 +728,7 @@ struct net_device_ops {
                                                        unsigned short vid);
 #ifdef CONFIG_NET_POLL_CONTROLLER
        void                    (*ndo_poll_controller)(struct net_device *dev);
+       void                    (*ndo_netpoll_cleanup)(struct net_device *dev);
 #endif
        int                     (*ndo_set_vf_mac)(struct net_device *dev,
                                                  int queue, u8 *mac);
@@ -744,6 +739,11 @@ struct net_device_ops {
        int                     (*ndo_get_vf_config)(struct net_device *dev,
                                                     int vf,
                                                     struct ifla_vf_info *ivf);
+       int                     (*ndo_set_vf_port)(struct net_device *dev,
+                                                  int vf,
+                                                  struct nlattr *port[]);
+       int                     (*ndo_get_vf_port)(struct net_device *dev,
+                                                  int vf, struct sk_buff *skb);
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
        int                     (*ndo_fcoe_enable)(struct net_device *dev);
        int                     (*ndo_fcoe_disable)(struct net_device *dev);
@@ -778,6 +778,9 @@ struct net_device {
         * the interface.
         */
        char                    name[IFNAMSIZ];
+
+       struct pm_qos_request_list *pm_qos_req;
+
        /* device name hash chain */
        struct hlist_node       name_hlist;
        /* snmp alias */
@@ -888,7 +891,7 @@ struct net_device {
        unsigned char           operstate; /* RFC2863 operstate */
        unsigned char           link_mode; /* mapping policy to operstate */
 
-       unsigned                mtu;    /* interface MTU value          */
+       unsigned int            mtu;    /* interface MTU value          */
        unsigned short          type;   /* interface hardware type      */
        unsigned short          hard_header_len;        /* hardware hdr length  */
 
@@ -1385,8 +1388,16 @@ static inline int unregister_gifconf(unsigned int family)
  */
 struct softnet_data {
        struct Qdisc            *output_queue;
+       struct Qdisc            **output_queue_tailp;
        struct list_head        poll_list;
        struct sk_buff          *completion_queue;
+       struct sk_buff_head     process_queue;
+
+       /* stats */
+       unsigned int            processed;
+       unsigned int            time_squeeze;
+       unsigned int            cpu_collision;
+       unsigned int            received_rps;
 
 #ifdef CONFIG_RPS
        struct softnet_data     *rps_ipi_list;
@@ -1396,7 +1407,9 @@ struct softnet_data {
        struct softnet_data     *rps_ipi_next;
        unsigned int            cpu;
        unsigned int            input_queue_head;
+       unsigned int            input_queue_tail;
 #endif
+       unsigned                dropped;
        struct sk_buff_head     input_pkt_queue;
        struct napi_struct      backlog;
 };
@@ -1408,6 +1421,14 @@ static inline void input_queue_head_incr(struct softnet_data *sd)
 #endif
 }
 
+static inline void input_queue_tail_incr_save(struct softnet_data *sd,
+                                             unsigned int *qtail)
+{
+#ifdef CONFIG_RPS
+       *qtail = ++sd->input_queue_tail;
+#endif
+}
+
 DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
 
 #define HAVE_NETIF_QUEUE
@@ -2099,6 +2120,7 @@ extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
 extern void            dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats);
 
 extern int             netdev_max_backlog;
+extern int             netdev_tstamp_prequeue;
 extern int             weight_p;
 extern int             netdev_set_master(struct net_device *dev, struct net_device *master);
 extern int skb_checksum_help(struct sk_buff *skb);