Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108812
b: refs/heads/master
c: def82a1
h: refs/heads/master
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Aug 18, 2008
1 parent d6f4fda commit 5e3fa3e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9312ae89324438b0edc554eb36c3ec6bf927d04
refs/heads/master: def82a1db1fdc4f861c77009e2ee86870c3743b0
34 changes: 19 additions & 15 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,19 +1339,23 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
}


void __netif_schedule(struct Qdisc *q)
static inline void __netif_reschedule(struct Qdisc *q)
{
if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state)) {
struct softnet_data *sd;
unsigned long flags;
struct softnet_data *sd;
unsigned long flags;

local_irq_save(flags);
sd = &__get_cpu_var(softnet_data);
q->next_sched = sd->output_queue;
sd->output_queue = q;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
local_irq_save(flags);
sd = &__get_cpu_var(softnet_data);
q->next_sched = sd->output_queue;
sd->output_queue = q;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}

void __netif_schedule(struct Qdisc *q)
{
if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state))
__netif_reschedule(q);
}
EXPORT_SYMBOL(__netif_schedule);

Expand Down Expand Up @@ -1980,15 +1984,15 @@ static void net_tx_action(struct softirq_action *h)

head = head->next_sched;

smp_mb__before_clear_bit();
clear_bit(__QDISC_STATE_SCHED, &q->state);

root_lock = qdisc_lock(q);
if (spin_trylock(root_lock)) {
smp_mb__before_clear_bit();
clear_bit(__QDISC_STATE_SCHED,
&q->state);
qdisc_run(q);
spin_unlock(root_lock);
} else {
__netif_schedule(q);
__netif_reschedule(q);
}
}
}
Expand Down

0 comments on commit 5e3fa3e

Please sign in to comment.