Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194553
b: refs/heads/master
c: a9cbd58
h: refs/heads/master
i:
  194551: 8823880
v: v3
  • Loading branch information
Changli Gao authored and David S. Miller committed Apr 27, 2010
1 parent 94e6755 commit dafb37e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 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: bb611874650cff942a7466b456a791e8bfa641e7
refs/heads/master: a9cbd588fdb71ea415754c885e2f9f03e6bf1ba0
1 change: 1 addition & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ static inline int unregister_gifconf(unsigned int family)
*/
struct softnet_data {
struct Qdisc *output_queue;
struct Qdisc **output_queue_tailp;
struct list_head poll_list;
struct sk_buff *completion_queue;

Expand Down
22 changes: 12 additions & 10 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,8 +1557,9 @@ static inline void __netif_reschedule(struct Qdisc *q)

local_irq_save(flags);
sd = &__get_cpu_var(softnet_data);
q->next_sched = sd->output_queue;
sd->output_queue = q;
q->next_sched = NULL;
*sd->output_queue_tailp = q;
sd->output_queue_tailp = &q->next_sched;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
Expand Down Expand Up @@ -2529,6 +2530,7 @@ static void net_tx_action(struct softirq_action *h)
local_irq_disable();
head = sd->output_queue;
sd->output_queue = NULL;
sd->output_queue_tailp = &sd->output_queue;
local_irq_enable();

while (head) {
Expand Down Expand Up @@ -5594,7 +5596,6 @@ static int dev_cpu_callback(struct notifier_block *nfb,
void *ocpu)
{
struct sk_buff **list_skb;
struct Qdisc **list_net;
struct sk_buff *skb;
unsigned int cpu, oldcpu = (unsigned long)ocpu;
struct softnet_data *sd, *oldsd;
Expand All @@ -5615,13 +5616,13 @@ static int dev_cpu_callback(struct notifier_block *nfb,
*list_skb = oldsd->completion_queue;
oldsd->completion_queue = NULL;

/* Find end of our output_queue. */
list_net = &sd->output_queue;
while (*list_net)
list_net = &(*list_net)->next_sched;
/* Append output queue from offline CPU. */
*list_net = oldsd->output_queue;
oldsd->output_queue = NULL;
if (oldsd->output_queue) {
*sd->output_queue_tailp = oldsd->output_queue;
sd->output_queue_tailp = oldsd->output_queue_tailp;
oldsd->output_queue = NULL;
oldsd->output_queue_tailp = &oldsd->output_queue;
}

raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable();
Expand Down Expand Up @@ -5851,7 +5852,8 @@ static int __init net_dev_init(void)
skb_queue_head_init(&sd->input_pkt_queue);
sd->completion_queue = NULL;
INIT_LIST_HEAD(&sd->poll_list);

sd->output_queue = NULL;
sd->output_queue_tailp = &sd->output_queue;
#ifdef CONFIG_RPS
sd->csd.func = rps_trigger_softirq;
sd->csd.info = sd;
Expand Down

0 comments on commit dafb37e

Please sign in to comment.