diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0f6b1c965815..be4957cf6511 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2191,11 +2191,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
2191 | extern void ether_setup(struct net_device *dev); | 2191 | extern void ether_setup(struct net_device *dev); |
2192 | 2192 | ||
2193 | /* Support for loadable net-drivers */ | 2193 | /* Support for loadable net-drivers */ |
2194 | extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | 2194 | extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, |
2195 | void (*setup)(struct net_device *), | 2195 | void (*setup)(struct net_device *), |
2196 | unsigned int queue_count); | 2196 | unsigned int txqs, unsigned int rxqs); |
2197 | #define alloc_netdev(sizeof_priv, name, setup) \ | 2197 | #define alloc_netdev(sizeof_priv, name, setup) \ |
2198 | alloc_netdev_mq(sizeof_priv, name, setup, 1) | 2198 | alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1) |
2199 | |||
2200 | #define alloc_netdev_mq(sizeof_priv, name, setup, count) \ | ||
2201 | alloc_netdev_mqs(sizeof_priv, name, setup, count, count) | ||
2202 | |||
2199 | extern int register_netdev(struct net_device *dev); | 2203 | extern int register_netdev(struct net_device *dev); |
2200 | extern void unregister_netdev(struct net_device *dev); | 2204 | extern void unregister_netdev(struct net_device *dev); |
2201 | 2205 | ||
@@ -2303,7 +2307,7 @@ unsigned long netdev_fix_features(unsigned long features, const char *name); | |||
2303 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2307 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2304 | struct net_device *dev); | 2308 | struct net_device *dev); |
2305 | 2309 | ||
2306 | int netif_get_vlan_features(struct sk_buff *skb, struct net_device *dev); | 2310 | int netif_skb_features(struct sk_buff *skb); |
2307 | 2311 | ||
2308 | static inline int net_gso_ok(int features, int gso_type) | 2312 | static inline int net_gso_ok(int features, int gso_type) |
2309 | { | 2313 | { |
@@ -2317,16 +2321,10 @@ static inline int skb_gso_ok(struct sk_buff *skb, int features) | |||
2317 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); | 2321 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); |
2318 | } | 2322 | } |
2319 | 2323 | ||
2320 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 2324 | static inline int netif_needs_gso(struct sk_buff *skb, int features) |
2321 | { | 2325 | { |
2322 | if (skb_is_gso(skb)) { | 2326 | return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || |
2323 | int features = netif_get_vlan_features(skb, dev); | 2327 | 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 | } | 2328 | } |
2331 | 2329 | ||
2332 | static inline void netif_set_gso_max_size(struct net_device *dev, | 2330 | static inline void netif_set_gso_max_size(struct net_device *dev, |