aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-09 01:58:37 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-09 01:58:37 -0400
commitee609cb36220d18c0cf476b066a5ab7e6f6d3a69 (patch)
tree7b6675143c304a82ffe52943cf94e6f822da303e /net/core
parent74d58a0c1d5b348a8d4ea9643b573a6ab455a3f3 (diff)
netdev: Move next_sched into struct netdev_queue.
We schedule queues, not the device, for output queue processing in BH. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ab760a954d99..d6b8d3c3e6ec 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1323,13 +1323,14 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
1323void __netif_schedule(struct net_device *dev) 1323void __netif_schedule(struct net_device *dev)
1324{ 1324{
1325 if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) { 1325 if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
1326 struct netdev_queue *txq = &dev->tx_queue;
1326 unsigned long flags; 1327 unsigned long flags;
1327 struct softnet_data *sd; 1328 struct softnet_data *sd;
1328 1329
1329 local_irq_save(flags); 1330 local_irq_save(flags);
1330 sd = &__get_cpu_var(softnet_data); 1331 sd = &__get_cpu_var(softnet_data);
1331 dev->next_sched = sd->output_queue; 1332 txq->next_sched = sd->output_queue;
1332 sd->output_queue = dev; 1333 sd->output_queue = txq;
1333 raise_softirq_irqoff(NET_TX_SOFTIRQ); 1334 raise_softirq_irqoff(NET_TX_SOFTIRQ);
1334 local_irq_restore(flags); 1335 local_irq_restore(flags);
1335 } 1336 }
@@ -1912,7 +1913,7 @@ static void net_tx_action(struct softirq_action *h)
1912 } 1913 }
1913 1914
1914 if (sd->output_queue) { 1915 if (sd->output_queue) {
1915 struct net_device *head; 1916 struct netdev_queue *head;
1916 1917
1917 local_irq_disable(); 1918 local_irq_disable();
1918 head = sd->output_queue; 1919 head = sd->output_queue;
@@ -1920,12 +1921,10 @@ static void net_tx_action(struct softirq_action *h)
1920 local_irq_enable(); 1921 local_irq_enable();
1921 1922
1922 while (head) { 1923 while (head) {
1923 struct net_device *dev = head; 1924 struct netdev_queue *txq = head;
1924 struct netdev_queue *txq; 1925 struct net_device *dev = txq->dev;
1925 head = head->next_sched; 1926 head = head->next_sched;
1926 1927
1927 txq = &dev->tx_queue;
1928
1929 smp_mb__before_clear_bit(); 1928 smp_mb__before_clear_bit();
1930 clear_bit(__LINK_STATE_SCHED, &dev->state); 1929 clear_bit(__LINK_STATE_SCHED, &dev->state);
1931 1930
@@ -4346,7 +4345,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
4346 void *ocpu) 4345 void *ocpu)
4347{ 4346{
4348 struct sk_buff **list_skb; 4347 struct sk_buff **list_skb;
4349 struct net_device **list_net; 4348 struct netdev_queue **list_net;
4350 struct sk_buff *skb; 4349 struct sk_buff *skb;
4351 unsigned int cpu, oldcpu = (unsigned long)ocpu; 4350 unsigned int cpu, oldcpu = (unsigned long)ocpu;
4352 struct softnet_data *sd, *oldsd; 4351 struct softnet_data *sd, *oldsd;