aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/dev.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 01993ad74e76..4a09833331f1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1939,22 +1939,6 @@ int netif_rx_ni(struct sk_buff *skb)
1939 1939
1940EXPORT_SYMBOL(netif_rx_ni); 1940EXPORT_SYMBOL(netif_rx_ni);
1941 1941
1942static inline struct net_device *skb_bond(struct sk_buff *skb)
1943{
1944 struct net_device *dev = skb->dev;
1945
1946 if (dev->master) {
1947 if (skb_bond_should_drop(skb)) {
1948 kfree_skb(skb);
1949 return NULL;
1950 }
1951 skb->dev = dev->master;
1952 }
1953
1954 return dev;
1955}
1956
1957
1958static void net_tx_action(struct softirq_action *h) 1942static void net_tx_action(struct softirq_action *h)
1959{ 1943{
1960 struct softnet_data *sd = &__get_cpu_var(softnet_data); 1944 struct softnet_data *sd = &__get_cpu_var(softnet_data);
@@ -2194,10 +2178,14 @@ int netif_receive_skb(struct sk_buff *skb)
2194 if (!skb->iif) 2178 if (!skb->iif)
2195 skb->iif = skb->dev->ifindex; 2179 skb->iif = skb->dev->ifindex;
2196 2180
2197 orig_dev = skb_bond(skb); 2181 orig_dev = skb->dev;
2198 2182 if (orig_dev->master) {
2199 if (!orig_dev) 2183 if (skb_bond_should_drop(skb)) {
2200 return NET_RX_DROP; 2184 kfree_skb(skb);
2185 return NET_RX_DROP;
2186 }
2187 skb->dev = orig_dev->master;
2188 }
2201 2189
2202 __get_cpu_var(netdev_rx_stat).total++; 2190 __get_cpu_var(netdev_rx_stat).total++;
2203 2191