diff options
author | Florian Westphal <fw@strlen.de> | 2014-05-05 09:00:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-07 15:49:07 -0400 |
commit | c1e756bfcbcac838a86a23f3e4501b556a961e3c (patch) | |
tree | 965fe4107b8a28f594832657610a74152e3f27a1 | |
parent | c7ba65d7b64984ff371cb5630b36af23506c50d5 (diff) |
Revert "net: core: introduce netif_skb_dev_features"
This reverts commit d206940319c41df4299db75ed56142177bb2e5f6,
there are no more callers.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/netdevice.h | 7 | ||||
-rw-r--r-- | net/core/dev.c | 22 |
2 files changed, 11 insertions, 18 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7ed3a3aa6604..20e99efb1ca6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3180,12 +3180,7 @@ void netdev_change_features(struct net_device *dev); | |||
3180 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 3180 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
3181 | struct net_device *dev); | 3181 | struct net_device *dev); |
3182 | 3182 | ||
3183 | netdev_features_t netif_skb_dev_features(struct sk_buff *skb, | 3183 | netdev_features_t netif_skb_features(struct sk_buff *skb); |
3184 | const struct net_device *dev); | ||
3185 | static inline netdev_features_t netif_skb_features(struct sk_buff *skb) | ||
3186 | { | ||
3187 | return netif_skb_dev_features(skb, skb->dev); | ||
3188 | } | ||
3189 | 3184 | ||
3190 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) | 3185 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) |
3191 | { | 3186 | { |
diff --git a/net/core/dev.c b/net/core/dev.c index d2c8a06b3a98..c619b8641337 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2418,7 +2418,7 @@ EXPORT_SYMBOL(netdev_rx_csum_fault); | |||
2418 | * 2. No high memory really exists on this machine. | 2418 | * 2. No high memory really exists on this machine. |
2419 | */ | 2419 | */ |
2420 | 2420 | ||
2421 | static int illegal_highdma(const struct net_device *dev, struct sk_buff *skb) | 2421 | static int illegal_highdma(struct net_device *dev, struct sk_buff *skb) |
2422 | { | 2422 | { |
2423 | #ifdef CONFIG_HIGHMEM | 2423 | #ifdef CONFIG_HIGHMEM |
2424 | int i; | 2424 | int i; |
@@ -2493,38 +2493,36 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) | |||
2493 | } | 2493 | } |
2494 | 2494 | ||
2495 | static netdev_features_t harmonize_features(struct sk_buff *skb, | 2495 | static netdev_features_t harmonize_features(struct sk_buff *skb, |
2496 | const struct net_device *dev, | 2496 | netdev_features_t features) |
2497 | netdev_features_t features) | ||
2498 | { | 2497 | { |
2499 | int tmp; | 2498 | int tmp; |
2500 | 2499 | ||
2501 | if (skb->ip_summed != CHECKSUM_NONE && | 2500 | if (skb->ip_summed != CHECKSUM_NONE && |
2502 | !can_checksum_protocol(features, skb_network_protocol(skb, &tmp))) { | 2501 | !can_checksum_protocol(features, skb_network_protocol(skb, &tmp))) { |
2503 | features &= ~NETIF_F_ALL_CSUM; | 2502 | features &= ~NETIF_F_ALL_CSUM; |
2504 | } else if (illegal_highdma(dev, skb)) { | 2503 | } else if (illegal_highdma(skb->dev, skb)) { |
2505 | features &= ~NETIF_F_SG; | 2504 | features &= ~NETIF_F_SG; |
2506 | } | 2505 | } |
2507 | 2506 | ||
2508 | return features; | 2507 | return features; |
2509 | } | 2508 | } |
2510 | 2509 | ||
2511 | netdev_features_t netif_skb_dev_features(struct sk_buff *skb, | 2510 | netdev_features_t netif_skb_features(struct sk_buff *skb) |
2512 | const struct net_device *dev) | ||
2513 | { | 2511 | { |
2514 | __be16 protocol = skb->protocol; | 2512 | __be16 protocol = skb->protocol; |
2515 | netdev_features_t features = dev->features; | 2513 | netdev_features_t features = skb->dev->features; |
2516 | 2514 | ||
2517 | if (skb_shinfo(skb)->gso_segs > dev->gso_max_segs) | 2515 | if (skb_shinfo(skb)->gso_segs > skb->dev->gso_max_segs) |
2518 | features &= ~NETIF_F_GSO_MASK; | 2516 | features &= ~NETIF_F_GSO_MASK; |
2519 | 2517 | ||
2520 | if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) { | 2518 | if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) { |
2521 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; | 2519 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; |
2522 | protocol = veh->h_vlan_encapsulated_proto; | 2520 | protocol = veh->h_vlan_encapsulated_proto; |
2523 | } else if (!vlan_tx_tag_present(skb)) { | 2521 | } else if (!vlan_tx_tag_present(skb)) { |
2524 | return harmonize_features(skb, dev, features); | 2522 | return harmonize_features(skb, features); |
2525 | } | 2523 | } |
2526 | 2524 | ||
2527 | features &= (dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX | | 2525 | features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX | |
2528 | NETIF_F_HW_VLAN_STAG_TX); | 2526 | NETIF_F_HW_VLAN_STAG_TX); |
2529 | 2527 | ||
2530 | if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) | 2528 | if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) |
@@ -2532,9 +2530,9 @@ netdev_features_t netif_skb_dev_features(struct sk_buff *skb, | |||
2532 | NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_CTAG_TX | | 2530 | NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_CTAG_TX | |
2533 | NETIF_F_HW_VLAN_STAG_TX; | 2531 | NETIF_F_HW_VLAN_STAG_TX; |
2534 | 2532 | ||
2535 | return harmonize_features(skb, dev, features); | 2533 | return harmonize_features(skb, features); |
2536 | } | 2534 | } |
2537 | EXPORT_SYMBOL(netif_skb_dev_features); | 2535 | EXPORT_SYMBOL(netif_skb_features); |
2538 | 2536 | ||
2539 | int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | 2537 | int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, |
2540 | struct netdev_queue *txq) | 2538 | struct netdev_queue *txq) |