diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0f6b1c965815..d971346b0340 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -520,9 +520,6 @@ struct netdev_queue { | |||
520 | * please use this field instead of dev->trans_start | 520 | * please use this field instead of dev->trans_start |
521 | */ | 521 | */ |
522 | unsigned long trans_start; | 522 | unsigned long trans_start; |
523 | u64 tx_bytes; | ||
524 | u64 tx_packets; | ||
525 | u64 tx_dropped; | ||
526 | } ____cacheline_aligned_in_smp; | 523 | } ____cacheline_aligned_in_smp; |
527 | 524 | ||
528 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) | 525 | static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) |
@@ -2191,11 +2188,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2191 | extern void ether_setup(struct net_device *dev); | 2188 | extern void ether_setup(struct net_device *dev); |
2192 | 2189 | ||
2193 | /* Support for loadable net-drivers */ | 2190 | /* Support for loadable net-drivers */ |
2194 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2191 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2195 | void (*setup)(struct net_device *), | 2192 | void (*setup)(struct net_device *), |
2196 | unsigned int queue_count); | 2193 | unsigned int txqs, unsigned int rxqs); |
2197 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2194 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2198 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2195 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2196 | |||
2197 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
2198 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
2199 | |||
2199 | extern int register_netdev(struct net_device *dev); | 2200 | extern int register_netdev(struct net_device *dev); |
2200 | extern void unregister_netdev(struct net_device *dev); | 2201 | extern void unregister_netdev(struct net_device *dev); |
2201 | 2202 | ||
@@ -2261,8 +2262,6 @@ extern void dev_load(struct net *net, const char *name); | |||
2261 | extern void dev_mcast_init(void); | 2262 | extern void dev_mcast_init(void); |
2262 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | 2263 | extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, |
2263 | struct rtnl_link_stats64 *storage); | 2264 | struct rtnl_link_stats64 *storage); |
2264 | extern void dev_txq_stats_fold(const struct net_device *dev, | ||
2265 | struct rtnl_link_stats64 *stats); | ||
2266 | 2265 | ||
2267 | extern int netdev_max_backlog; | 2266 | extern int netdev_max_backlog; |
2268 | extern int netdev_tstamp_prequeue; | 2267 | extern int netdev_tstamp_prequeue; |
@@ -2303,7 +2302,7 @@ unsigned long netdev_fix_features(unsigned long features, const char *name); | |||
2303 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2302 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2304 | struct net_device *dev); | 2303 | struct net_device *dev); |
2305 | 2304 | ||
2306 | int netif_get_vlan_features(struct sk_buff *skb, struct net_device *dev); | 2305 | int netif_skb_features(struct sk_buff *skb); |
2307 | 2306 | ||
2308 | static inline int net_gso_ok(int features, int gso_type) | 2307 | static inline int net_gso_ok(int features, int gso_type) |
2309 | { | 2308 | { |
@@ -2317,16 +2316,10 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
2317 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); | 2316 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); |
2318 | } | 2317 | } |
2319 | 2318 | ||
2320 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2319 | static inline int netif_needs_gso(struct sk_buff *skb, int features) |
2321 | { | 2320 | { |
2322 | if (skb_is_gso(skb)) { | 2321 | return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || |
2323 | int features = netif_get_vlan_features(skb, dev); | 2322 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); |
2324 | |||
2325 | return (!skb_gso_ok(skb, features) || | ||
2326 | unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); | ||
2327 | } | ||
2328 | |||
2329 | return 0; | ||
2330 | } | 2323 | } |
2331 | 2324 | ||
2332 | static inline void netif_set_gso_max_size(struct net_device *dev, | 2325 | static inline void netif_set_gso_max_size(struct net_device *dev, |