diff options
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d94cb1431519..eb06e58bed0b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1046,10 +1046,9 @@ struct net_device { | |||
| 1046 | */ | 1046 | */ |
| 1047 | char name[IFNAMSIZ]; | 1047 | char name[IFNAMSIZ]; |
| 1048 | 1048 | ||
| 1049 | struct pm_qos_request pm_qos_req; | 1049 | /* device name hash chain, please keep it close to name[] */ |
| 1050 | |||
| 1051 | /* device name hash chain */ | ||
| 1052 | struct hlist_node name_hlist; | 1050 | struct hlist_node name_hlist; |
| 1051 | |||
| 1053 | /* snmp alias */ | 1052 | /* snmp alias */ |
| 1054 | char *ifalias; | 1053 | char *ifalias; |
| 1055 | 1054 | ||
| @@ -1322,6 +1321,8 @@ struct net_device { | |||
| 1322 | 1321 | ||
| 1323 | /* group the device belongs to */ | 1322 | /* group the device belongs to */ |
| 1324 | int group; | 1323 | int group; |
| 1324 | |||
| 1325 | struct pm_qos_request pm_qos_req; | ||
| 1325 | }; | 1326 | }; |
| 1326 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 1327 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
| 1327 | 1328 | ||
| @@ -1626,6 +1627,7 @@ extern int dev_alloc_name(struct net_device *dev, const char *name); | |||
| 1626 | extern int dev_open(struct net_device *dev); | 1627 | extern int dev_open(struct net_device *dev); |
| 1627 | extern int dev_close(struct net_device *dev); | 1628 | extern int dev_close(struct net_device *dev); |
| 1628 | extern void dev_disable_lro(struct net_device *dev); | 1629 | extern void dev_disable_lro(struct net_device *dev); |
| 1630 | extern int dev_loopback_xmit(struct sk_buff *newskb); | ||
| 1629 | extern int dev_queue_xmit(struct sk_buff *skb); | 1631 | extern int dev_queue_xmit(struct sk_buff *skb); |
| 1630 | extern int register_netdevice(struct net_device *dev); | 1632 | extern int register_netdevice(struct net_device *dev); |
| 1631 | extern void unregister_netdevice_queue(struct net_device *dev, | 1633 | extern void unregister_netdevice_queue(struct net_device *dev, |
| @@ -2108,7 +2110,12 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev, | |||
| 2108 | static inline int netif_copy_real_num_queues(struct net_device *to_dev, | 2110 | static inline int netif_copy_real_num_queues(struct net_device *to_dev, |
| 2109 | const struct net_device *from_dev) | 2111 | const struct net_device *from_dev) |
| 2110 | { | 2112 | { |
| 2111 | netif_set_real_num_tx_queues(to_dev, from_dev->real_num_tx_queues); | 2113 | int err; |
| 2114 | |||
| 2115 | err = netif_set_real_num_tx_queues(to_dev, | ||
| 2116 | from_dev->real_num_tx_queues); | ||
| 2117 | if (err) | ||
| 2118 | return err; | ||
| 2112 | #ifdef CONFIG_RPS | 2119 | #ifdef CONFIG_RPS |
| 2113 | return netif_set_real_num_rx_queues(to_dev, | 2120 | return netif_set_real_num_rx_queues(to_dev, |
| 2114 | from_dev->real_num_rx_queues); | 2121 | from_dev->real_num_rx_queues); |
| @@ -2117,6 +2124,9 @@ static inline int netif_copy_real_num_queues(struct net_device *to_dev, | |||
| 2117 | #endif | 2124 | #endif |
| 2118 | } | 2125 | } |
| 2119 | 2126 | ||
| 2127 | #define DEFAULT_MAX_NUM_RSS_QUEUES (8) | ||
| 2128 | extern int netif_get_num_default_rss_queues(void); | ||
| 2129 | |||
| 2120 | /* Use this variant when it is known for sure that it | 2130 | /* Use this variant when it is known for sure that it |
| 2121 | * is executing from hardware interrupt context or with hardware interrupts | 2131 | * is executing from hardware interrupt context or with hardware interrupts |
| 2122 | * disabled. | 2132 | * disabled. |
