diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:31 -0400 |
commit | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (patch) | |
tree | 51c50bcb67a5039448ddfa1869d7948cab1217e9 /net/core/dev.c | |
parent | 19c1a6f5764d787113fa323ffb18be7991208f82 (diff) | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) |
Merge commit 'v2.6.30-rc5' into core/iommu
Merge reason: core/iommu was on an .30-rc1 base,
update it to .30-rc5 to refresh.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 91d792d17e09..e2e9e4af3ace 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 | } |
@@ -1730,11 +1735,12 @@ u16 skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb) | |||
1730 | { | 1735 | { |
1731 | u32 hash; | 1736 | u32 hash; |
1732 | 1737 | ||
1733 | if (skb_rx_queue_recorded(skb)) { | 1738 | if (skb_rx_queue_recorded(skb)) |
1734 | hash = skb_get_rx_queue(skb); | 1739 | return skb_get_rx_queue(skb) % dev->real_num_tx_queues; |
1735 | } else if (skb->sk && skb->sk->sk_hash) { | 1740 | |
1741 | if (skb->sk && skb->sk->sk_hash) | ||
1736 | hash = skb->sk->sk_hash; | 1742 | hash = skb->sk->sk_hash; |
1737 | } else | 1743 | else |
1738 | hash = skb->protocol; | 1744 | hash = skb->protocol; |
1739 | 1745 | ||
1740 | hash = jhash_1word(hash, skb_tx_hashrnd); | 1746 | hash = jhash_1word(hash, skb_tx_hashrnd); |
@@ -2328,8 +2334,10 @@ static int napi_gro_complete(struct sk_buff *skb) | |||
2328 | struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; | 2334 | struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK]; |
2329 | int err = -ENOENT; | 2335 | int err = -ENOENT; |
2330 | 2336 | ||
2331 | if (NAPI_GRO_CB(skb)->count == 1) | 2337 | if (NAPI_GRO_CB(skb)->count == 1) { |
2338 | skb_shinfo(skb)->gso_size = 0; | ||
2332 | goto out; | 2339 | goto out; |
2340 | } | ||
2333 | 2341 | ||
2334 | rcu_read_lock(); | 2342 | rcu_read_lock(); |
2335 | list_for_each_entry_rcu(ptype, head, list) { | 2343 | list_for_each_entry_rcu(ptype, head, list) { |
@@ -2348,7 +2356,6 @@ static int napi_gro_complete(struct sk_buff *skb) | |||
2348 | } | 2356 | } |
2349 | 2357 | ||
2350 | out: | 2358 | out: |
2351 | skb_shinfo(skb)->gso_size = 0; | ||
2352 | return netif_receive_skb(skb); | 2359 | return netif_receive_skb(skb); |
2353 | } | 2360 | } |
2354 | 2361 | ||
@@ -2539,9 +2546,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi, | |||
2539 | } | 2546 | } |
2540 | 2547 | ||
2541 | BUG_ON(info->nr_frags > MAX_SKB_FRAGS); | 2548 | BUG_ON(info->nr_frags > MAX_SKB_FRAGS); |
2542 | frag = &info->frags[info->nr_frags - 1]; | 2549 | frag = info->frags; |
2543 | 2550 | ||
2544 | for (i = skb_shinfo(skb)->nr_frags; i < info->nr_frags; i++) { | 2551 | for (i = 0; i < info->nr_frags; i++) { |
2545 | skb_fill_page_desc(skb, i, frag->page, frag->page_offset, | 2552 | skb_fill_page_desc(skb, i, frag->page, frag->page_offset, |
2546 | frag->size); | 2553 | frag->size); |
2547 | frag++; | 2554 | frag++; |
@@ -4399,7 +4406,7 @@ int register_netdevice(struct net_device *dev) | |||
4399 | dev->iflink = -1; | 4406 | dev->iflink = -1; |
4400 | 4407 | ||
4401 | #ifdef CONFIG_COMPAT_NET_DEV_OPS | 4408 | #ifdef CONFIG_COMPAT_NET_DEV_OPS |
4402 | /* Netdevice_ops API compatiability support. | 4409 | /* Netdevice_ops API compatibility support. |
4403 | * This is temporary until all network devices are converted. | 4410 | * This is temporary until all network devices are converted. |
4404 | */ | 4411 | */ |
4405 | if (dev->netdev_ops) { | 4412 | if (dev->netdev_ops) { |
@@ -4410,7 +4417,7 @@ int register_netdevice(struct net_device *dev) | |||
4410 | dev->name, netdev_drivername(dev, drivername, 64)); | 4417 | dev->name, netdev_drivername(dev, drivername, 64)); |
4411 | 4418 | ||
4412 | /* This works only because net_device_ops and the | 4419 | /* This works only because net_device_ops and the |
4413 | compatiablity structure are the same. */ | 4420 | compatibility structure are the same. */ |
4414 | dev->netdev_ops = (void *) &(dev->init); | 4421 | dev->netdev_ops = (void *) &(dev->init); |
4415 | } | 4422 | } |
4416 | #endif | 4423 | #endif |