aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3c5ed5f5274e..69022d47d6f2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -218,16 +218,6 @@ struct neighbour;
218struct neigh_parms; 218struct neigh_parms;
219struct sk_buff; 219struct sk_buff;
220 220
221struct netif_rx_stats {
222 unsigned total;
223 unsigned dropped;
224 unsigned time_squeeze;
225 unsigned cpu_collision;
226 unsigned received_rps;
227};
228
229DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
230
231struct netdev_hw_addr { 221struct netdev_hw_addr {
232 struct list_head list; 222 struct list_head list;
233 unsigned char addr[MAX_ADDR_LEN]; 223 unsigned char addr[MAX_ADDR_LEN];
@@ -734,6 +724,7 @@ struct net_device_ops {
734 unsigned short vid); 724 unsigned short vid);
735#ifdef CONFIG_NET_POLL_CONTROLLER 725#ifdef CONFIG_NET_POLL_CONTROLLER
736 void (*ndo_poll_controller)(struct net_device *dev); 726 void (*ndo_poll_controller)(struct net_device *dev);
727 void (*ndo_netpoll_cleanup)(struct net_device *dev);
737#endif 728#endif
738 int (*ndo_set_vf_mac)(struct net_device *dev, 729 int (*ndo_set_vf_mac)(struct net_device *dev,
739 int queue, u8 *mac); 730 int queue, u8 *mac);
@@ -888,7 +879,7 @@ struct net_device {
888 unsigned char operstate; /* RFC2863 operstate */ 879 unsigned char operstate; /* RFC2863 operstate */
889 unsigned char link_mode; /* mapping policy to operstate */ 880 unsigned char link_mode; /* mapping policy to operstate */
890 881
891 unsigned mtu; /* interface MTU value */ 882 unsigned int mtu; /* interface MTU value */
892 unsigned short type; /* interface hardware type */ 883 unsigned short type; /* interface hardware type */
893 unsigned short hard_header_len; /* hardware hdr length */ 884 unsigned short hard_header_len; /* hardware hdr length */
894 885
@@ -1385,8 +1376,16 @@ static inline int unregister_gifconf(unsigned int family)
1385 */ 1376 */
1386struct softnet_data { 1377struct softnet_data {
1387 struct Qdisc *output_queue; 1378 struct Qdisc *output_queue;
1379 struct Qdisc **output_queue_tailp;
1388 struct list_head poll_list; 1380 struct list_head poll_list;
1389 struct sk_buff *completion_queue; 1381 struct sk_buff *completion_queue;
1382 struct sk_buff_head process_queue;
1383
1384 /* stats */
1385 unsigned int processed;
1386 unsigned int time_squeeze;
1387 unsigned int cpu_collision;
1388 unsigned int received_rps;
1390 1389
1391#ifdef CONFIG_RPS 1390#ifdef CONFIG_RPS
1392 struct softnet_data *rps_ipi_list; 1391 struct softnet_data *rps_ipi_list;
@@ -1397,14 +1396,16 @@ struct softnet_data {
1397 unsigned int cpu; 1396 unsigned int cpu;
1398 unsigned int input_queue_head; 1397 unsigned int input_queue_head;
1399#endif 1398#endif
1399 unsigned dropped;
1400 struct sk_buff_head input_pkt_queue; 1400 struct sk_buff_head input_pkt_queue;
1401 struct napi_struct backlog; 1401 struct napi_struct backlog;
1402}; 1402};
1403 1403
1404static inline void input_queue_head_incr(struct softnet_data *sd) 1404static inline void input_queue_head_add(struct softnet_data *sd,
1405 unsigned int len)
1405{ 1406{
1406#ifdef CONFIG_RPS 1407#ifdef CONFIG_RPS
1407 sd->input_queue_head++; 1408 sd->input_queue_head += len;
1408#endif 1409#endif
1409} 1410}
1410 1411