diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 91d792d17e09..308a7d0c277f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1336,7 +1336,12 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1336 | { | 1336 | { |
1337 | struct packet_type *ptype; | 1337 | struct packet_type *ptype; |
1338 | 1338 | ||
1339 | #ifdef CONFIG_NET_CLS_ACT | ||
1340 | if (!(skb->tstamp.tv64 && (G_TC_FROM(skb->tc_verd) & AT_INGRESS))) | ||
1341 | net_timestamp(skb); | ||
1342 | #else | ||
1339 | net_timestamp(skb); | 1343 | net_timestamp(skb); |
1344 | #endif | ||
1340 | 1345 | ||
1341 | rcu_read_lock(); | 1346 | rcu_read_lock(); |
1342 | list_for_each_entry_rcu(ptype, &ptype_all, list) { | 1347 | list_for_each_entry_rcu(ptype, &ptype_all, list) { |
@@ -1430,7 +1435,7 @@ void netif_device_detach(struct net_device *dev) | |||
1430 | { | 1435 | { |
1431 | if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) && | 1436 | if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) && |
1432 | netif_running(dev)) { | 1437 | netif_running(dev)) { |
1433 | netif_stop_queue(dev); | 1438 | netif_tx_stop_all_queues(dev); |
1434 | } | 1439 | } |
1435 | } | 1440 | } |
1436 | EXPORT_SYMBOL(netif_device_detach); | 1441 | EXPORT_SYMBOL(netif_device_detach); |
@@ -1445,7 +1450,7 @@ void netif_device_attach(struct net_device *dev) | |||
1445 | { | 1450 | { |
1446 | if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) && | 1451 | if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) && |
1447 | netif_running(dev)) { | 1452 | netif_running(dev)) { |
1448 | netif_wake_queue(dev); | 1453 | netif_tx_wake_all_queues(dev); |
1449 | __netdev_watchdog_up(dev); | 1454 | __netdev_watchdog_up(dev); |
1450 | } | 1455 | } |
1451 | } | 1456 | } |
@@ -2328,8 +2333,10 @@ static int napi_gro_complete(struct sk_buff *skb) | |||
2328 | struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; | 2333 | struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; |
2329 | int err = -ENOENT; | 2334 | int err = -ENOENT; |
2330 | 2335 | ||
2331 | if (NAPI_GRO_CB(skb)->count == 1) | 2336 | if (NAPI_GRO_CB(skb)->count == 1) { |
2337 | skb_shinfo(skb)->gso_size = 0; | ||
2332 | goto out; | 2338 | goto out; |
2339 | } | ||
2333 | 2340 | ||
2334 | rcu_read_lock(); | 2341 | rcu_read_lock(); |
2335 | list_for_each_entry_rcu(ptype, head, list) { | 2342 | list_for_each_entry_rcu(ptype, head, list) { |
@@ -2348,7 +2355,6 @@ static int napi_gro_complete(struct sk_buff *skb) | |||
2348 | } | 2355 | } |
2349 | 2356 | ||
2350 | out: | 2357 | out: |
2351 | skb_shinfo(skb)->gso_size = 0; | ||
2352 | return netif_receive_skb(skb); | 2358 | return netif_receive_skb(skb); |
2353 | } | 2359 | } |
2354 | 2360 | ||
@@ -2539,9 +2545,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi, | |||
2539 | } | 2545 | } |
2540 | 2546 | ||
2541 | BUG_ON(info->nr_frags > MAX_SKB_FRAGS); | 2547 | BUG_ON(info->nr_frags > MAX_SKB_FRAGS); |
2542 | frag = &info->frags[info->nr_frags - 1]; | 2548 | frag = info->frags; |
2543 | 2549 | ||
2544 | for (i = skb_shinfo(skb)->nr_frags; i < info->nr_frags; i++) { | 2550 | for (i = 0; i < info->nr_frags; i++) { |
2545 | skb_fill_page_desc(skb, i, frag->page, frag->page_offset, | 2551 | skb_fill_page_desc(skb, i, frag->page, frag->page_offset, |
2546 | frag->size); | 2552 | frag->size); |
2547 | frag++; | 2553 | frag++; |
@@ -4399,7 +4405,7 @@ int register_netdevice(struct net_device *dev) | |||
4399 | dev->iflink = -1; | 4405 | dev->iflink = -1; |
4400 | 4406 | ||
4401 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | 4407 | #ifdef CONFIG_COMPAT_NET_DEV_OPS |
4402 | /* Netdevice_ops API compatiability support. | 4408 | /* Netdevice_ops API compatibility support. |
4403 | * This is temporary until all network devices are converted. | 4409 | * This is temporary until all network devices are converted. |
4404 | */ | 4410 | */ |
4405 | if (dev->netdev_ops) { | 4411 | if (dev->netdev_ops) { |
@@ -4410,7 +4416,7 @@ int register_netdevice(struct net_device *dev) | |||
4410 | dev->name, netdev_drivername(dev, drivername, 64)); | 4416 | dev->name, netdev_drivername(dev, drivername, 64)); |
4411 | 4417 | ||
4412 | /* This works only because net_device_ops and the | 4418 | /* This works only because net_device_ops and the |
4413 | compatiablity structure are the same. */ | 4419 | compatibility structure are the same. */ |
4414 | dev->netdev_ops = (void *) &(dev->init); | 4420 | dev->netdev_ops = (void *) &(dev->init); |
4415 | } | 4421 | } |
4416 | #endif | 4422 | #endif |