diff options
-rw-r--r-- | include/linux/netdevice.h | 5 | ||||
-rw-r--r-- | net/core/dev.c | 15 |
2 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e7c49246fd88..1379c822e51d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -454,6 +454,7 @@ struct netdev_queue { | |||
454 | struct Qdisc *qdisc; | 454 | struct Qdisc *qdisc; |
455 | struct Qdisc *qdisc_sleeping; | 455 | struct Qdisc *qdisc_sleeping; |
456 | struct list_head qdisc_list; | 456 | struct list_head qdisc_list; |
457 | struct netdev_queue *next_sched; | ||
457 | }; | 458 | }; |
458 | 459 | ||
459 | /* | 460 | /* |
@@ -545,8 +546,6 @@ struct net_device | |||
545 | #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) | 546 | #define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) |
546 | #define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) | 547 | #define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) |
547 | 548 | ||
548 | struct net_device *next_sched; | ||
549 | |||
550 | /* Interface index. Unique device identifier */ | 549 | /* Interface index. Unique device identifier */ |
551 | int ifindex; | 550 | int ifindex; |
552 | int iflink; | 551 | int iflink; |
@@ -940,7 +939,7 @@ static inline int unregister_gifconf(unsigned int family) | |||
940 | */ | 939 | */ |
941 | struct softnet_data | 940 | struct softnet_data |
942 | { | 941 | { |
943 | struct net_device *output_queue; | 942 | struct netdev_queue *output_queue; |
944 | struct sk_buff_head input_pkt_queue; | 943 | struct sk_buff_head input_pkt_queue; |
945 | struct list_head poll_list; | 944 | struct list_head poll_list; |
946 | struct sk_buff *completion_queue; | 945 | struct sk_buff *completion_queue; |
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) | |||
1323 | void __netif_schedule(struct net_device *dev) | 1323 | void __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; |