diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 20:18:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 20:18:23 -0400 |
commit | dc2b48475a0a36f8b3bbb2da60d3a006dc5c2c84 (patch) | |
tree | b2421a338840bd1c675f4f91de7c7cf03863fb78 /include | |
parent | 5ce2d488fe039ddd86a638496cf704df86c74eeb (diff) |
netdev: Move queue_lock into struct netdev_queue.
The lock is now an attribute of the device queue.
One thing to notice is that "suspicious" places
emerge which will need specific training about
multiple queue handling. They are so marked with
explicit "netdev->rx_queue" and "netdev->tx_queue"
references.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 515fd25bf0fc..e835acacb479 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -449,6 +449,7 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
449 | #endif | 449 | #endif |
450 | 450 | ||
451 | struct netdev_queue { | 451 | struct netdev_queue { |
452 | spinlock_t lock; | ||
452 | struct net_device *dev; | 453 | struct net_device *dev; |
453 | }; | 454 | }; |
454 | 455 | ||
@@ -629,7 +630,7 @@ struct net_device | |||
629 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 630 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
630 | 631 | ||
631 | struct netdev_queue rx_queue; | 632 | struct netdev_queue rx_queue; |
632 | struct netdev_queue tx_queue; | 633 | struct netdev_queue tx_queue ____cacheline_aligned_in_smp; |
633 | 634 | ||
634 | /* ingress path synchronizer */ | 635 | /* ingress path synchronizer */ |
635 | spinlock_t ingress_lock; | 636 | spinlock_t ingress_lock; |
@@ -639,7 +640,6 @@ struct net_device | |||
639 | * Cache line mostly used on queue transmit path (qdisc) | 640 | * Cache line mostly used on queue transmit path (qdisc) |
640 | */ | 641 | */ |
641 | /* device queue lock */ | 642 | /* device queue lock */ |
642 | spinlock_t queue_lock ____cacheline_aligned_in_smp; | ||
643 | struct Qdisc *qdisc; | 643 | struct Qdisc *qdisc; |
644 | struct Qdisc *qdisc_sleeping; | 644 | struct Qdisc *qdisc_sleeping; |
645 | struct list_head qdisc_list; | 645 | struct list_head qdisc_list; |