diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 9823b7713f79..d5b1315218d3 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3566,9 +3566,6 @@ static void skb_update_prio(struct sk_buff *skb) | |||
3566 | #define skb_update_prio(skb) | 3566 | #define skb_update_prio(skb) |
3567 | #endif | 3567 | #endif |
3568 | 3568 | ||
3569 | DEFINE_PER_CPU(int, xmit_recursion); | ||
3570 | EXPORT_SYMBOL(xmit_recursion); | ||
3571 | |||
3572 | /** | 3569 | /** |
3573 | * dev_loopback_xmit - loop back @skb | 3570 | * dev_loopback_xmit - loop back @skb |
3574 | * @net: network namespace this loopback is happening in | 3571 | * @net: network namespace this loopback is happening in |
@@ -3857,8 +3854,7 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev) | |||
3857 | int cpu = smp_processor_id(); /* ok because BHs are off */ | 3854 | int cpu = smp_processor_id(); /* ok because BHs are off */ |
3858 | 3855 | ||
3859 | if (txq->xmit_lock_owner != cpu) { | 3856 | if (txq->xmit_lock_owner != cpu) { |
3860 | if (unlikely(__this_cpu_read(xmit_recursion) > | 3857 | if (dev_xmit_recursion()) |
3861 | XMIT_RECURSION_LIMIT)) | ||
3862 | goto recursion_alert; | 3858 | goto recursion_alert; |
3863 | 3859 | ||
3864 | skb = validate_xmit_skb(skb, dev, &again); | 3860 | skb = validate_xmit_skb(skb, dev, &again); |
@@ -3868,9 +3864,9 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev) | |||
3868 | HARD_TX_LOCK(dev, txq, cpu); | 3864 | HARD_TX_LOCK(dev, txq, cpu); |
3869 | 3865 | ||
3870 | if (!netif_xmit_stopped(txq)) { | 3866 | if (!netif_xmit_stopped(txq)) { |
3871 | __this_cpu_inc(xmit_recursion); | 3867 | dev_xmit_recursion_inc(); |
3872 | skb = dev_hard_start_xmit(skb, dev, txq, &rc); | 3868 | skb = dev_hard_start_xmit(skb, dev, txq, &rc); |
3873 | __this_cpu_dec(xmit_recursion); | 3869 | dev_xmit_recursion_dec(); |
3874 | if (dev_xmit_complete(rc)) { | 3870 | if (dev_xmit_complete(rc)) { |
3875 | HARD_TX_UNLOCK(dev, txq); | 3871 | HARD_TX_UNLOCK(dev, txq); |
3876 | goto out; | 3872 | goto out; |